mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-21 13:00:56 +01:00
Uncollapse side panel after enabling file tree
Summary: If user enables file tree but had toggled the side panel with 'F' before, it didn't show up. It is confusing. Test Plan: With hidden panel, enabled filetree. Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D5160
This commit is contained in:
parent
f6bba771cb
commit
85975084e9
1 changed files with 9 additions and 3 deletions
|
@ -22,9 +22,15 @@ final class PhabricatorSettingsPanelDiffPreferences
|
||||||
$pref_filetree = PhabricatorUserPreferences::PREFERENCE_DIFF_FILETREE;
|
$pref_filetree = PhabricatorUserPreferences::PREFERENCE_DIFF_FILETREE;
|
||||||
|
|
||||||
if ($request->isFormPost()) {
|
if ($request->isFormPost()) {
|
||||||
$preferences->setPreference(
|
$filetree = $request->getInt($pref_filetree);
|
||||||
$pref_filetree,
|
|
||||||
$request->getInt($pref_filetree));
|
if ($filetree && !$preferences->getPreference($pref_filetree)) {
|
||||||
|
$preferences->setPreference(
|
||||||
|
PhabricatorUserPreferences::PREFERENCE_NAV_COLLAPSED,
|
||||||
|
false);
|
||||||
|
}
|
||||||
|
|
||||||
|
$preferences->setPreference($pref_filetree, $filetree);
|
||||||
|
|
||||||
$preferences->save();
|
$preferences->save();
|
||||||
return id(new AphrontRedirectResponse())
|
return id(new AphrontRedirectResponse())
|
||||||
|
|
Loading…
Reference in a new issue