fix(tabs-list-mode): layout switch#16305
Conversation
| } | ||
| setLayoutSwitchButton(); | ||
|
|
||
| setFabVisible(!mHideFab); |
There was a problem hiding this comment.
setGridSwitchButton internally checks nullability
| } | ||
|
|
||
| protected void openSharedTab() { | ||
| resetFileDepth(); |
There was a problem hiding this comment.
The call of openSharedTab already resets file depth.
| } | ||
|
|
||
| closeDrawer(); | ||
| setupHomeSearchToolbarWithSortAndListButtons(); |
There was a problem hiding this comment.
Needed to display the correct action bar when the user comes back from the shared tab. In the future, we can deduplicate the navigation logic.
| switchToGridView(); | ||
| } else if (!isGridViewPreferred(mFile) && isGridEnabled()) { | ||
| switchToListView(); | ||
| } |
There was a problem hiding this comment.
isGridEnabled already used inside the switch functions.
| return FOLDER_LAYOUT_GRID.equals(preferences.getFolderLayout(folder)); | ||
| private boolean isGridViewPreferred(@Nullable OCFile folder) { | ||
| if (searchEvent != null) { | ||
| return (searchEvent.toSearchType() != SHARED_FILTER) && |
There was a problem hiding this comment.
The Shared tab can only display files in list mode for now, so folder preferences cannot be applied there since there is no toggle to change it.
03b1888 to
b45d973
Compare
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
b45d973 to
cba5e8c
Compare
|
APK file: https://www.kaminsky.me/nc-dev/android-artifacts/16305.apk |
|
blue-Light-Screenshot test failed, but no output was generated. Maybe a preliminary stage failed. |
|
/backport to stable-3.35 |

Issue
Changing the layout mode in the Favorites tab currently affects the Shared tab as well.
The Shared tab does not support grid view and should always display files in list view.
Actual behavior:
Files in the Shared tab are displayed in grid view when the layout is toggled in the Favorites tab, even though no toggle button is available in the Shared tab.
Expected behavior:
Layout changes in the Favorites tab should not impact the Shared tab, which should always remain in list view.
Changes
nullto determine the correct file list mode.Out of scope
The app has multiple roots (e.g., All Files, Favorites, Shared). Currently, the layout preference for Favorites and All Files roots is not stored separately. Therefore, remembering the last picked layout for these roots is out of scope for this PR.
Introducing layout switch mode for shared tab.