File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
owncloudApp/src/main/java/com/owncloud/android/ui/activity Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -813,12 +813,10 @@ class FileDisplayActivity : FileActivity(),
813813 Timber .v(" onResume() start" )
814814 super .onResume()
815815
816+ updateBottomBarSelection(mainFileListFragment?.getCurrentSpace())
816817 if (mainFileListFragment?.getCurrentSpace()?.isProject == true ||
817818 (mainFileListFragment?.getCurrentSpace()?.isPersonal == true && isMultiPersonal)) {
818- setCheckedItemAtBottomBar(getMenuItemForFileListOption(FileListOption .SPACES_LIST ))
819819 updateToolbar(null , mainFileListFragment?.getCurrentSpace())
820- } else {
821- setCheckedItemAtBottomBar(getMenuItemForFileListOption(fileListOption))
822820 }
823821
824822 if (secondFragment == null ) {
@@ -1893,9 +1891,20 @@ class FileDisplayActivity : FileActivity(),
18931891
18941892 override fun onCurrentFolderUpdated (newCurrentFolder : OCFile , currentSpace : OCSpace ? ) {
18951893 updateToolbar(newCurrentFolder, currentSpace)
1894+ val newCurrentFolderSpace = currentSpace?.takeIf { it.id == newCurrentFolder.spaceId }
1895+ updateBottomBarSelection(newCurrentFolderSpace)
18961896 file = newCurrentFolder
18971897 }
18981898
1899+ private fun updateBottomBarSelection (currentSpace : OCSpace ? ) {
1900+ val bottomBarOption = if (currentSpace?.isProject == true ) {
1901+ FileListOption .SPACES_LIST
1902+ } else {
1903+ fileListOption
1904+ }
1905+ setCheckedItemAtBottomBar(getMenuItemForFileListOption(bottomBarOption))
1906+ }
1907+
18991908 override fun onFileClicked (file : OCFile ) {
19001909 when {
19011910 PreviewImageFragment .canBePreviewed(file) -> {
You can’t perform that action at this time.
0 commit comments