1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-21 04:50:55 +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:
vrana 2013-02-28 12:55:03 -08:00
parent f6bba771cb
commit 85975084e9

View file

@ -22,9 +22,15 @@ final class PhabricatorSettingsPanelDiffPreferences
$pref_filetree = PhabricatorUserPreferences::PREFERENCE_DIFF_FILETREE;
if ($request->isFormPost()) {
$filetree = $request->getInt($pref_filetree);
if ($filetree && !$preferences->getPreference($pref_filetree)) {
$preferences->setPreference(
$pref_filetree,
$request->getInt($pref_filetree));
PhabricatorUserPreferences::PREFERENCE_NAV_COLLAPSED,
false);
}
$preferences->setPreference($pref_filetree, $filetree);
$preferences->save();
return id(new AphrontRedirectResponse())