Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a8bf2c08 authored by Ben Lin's avatar Ben Lin
Browse files

Honoring root's view mode when opening new window.

We previously used to honor the view mode configuration when we
change/select the root. However, opening in new window goes through a
different code path, and skips the openRoot code. This fixes it by
always loading the root's view mode at every directory opening.

Bug: 38230161
Change-Id: I551bc7000abe555f95364eaaeac43df578c5bf1b
parent f625007a
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -291,7 +291,6 @@ public abstract class BaseActivity
        }

        mInjector.actionModeController.finishActionMode();
        mState.derivedMode = LocalPreferences.getViewMode(this, root, MODE_GRID);
        mSortController.onViewModeChanged(mState.derivedMode);

        // Set summary header's visibility. Only recents and downloads root may have summary in
@@ -395,6 +394,8 @@ public abstract class BaseActivity
        // from the saved state passed in onCreate().
        mSearchManager.cancelSearch();

        mState.derivedMode = LocalPreferences.getViewMode(this, mState.stack.getRoot(), MODE_GRID);

        refreshDirectory(anim);

        final RootsFragment roots = RootsFragment.get(getFragmentManager());