Merge pull request #7156 from nextcloud/fixBackFromRichWorkspace

Fix: #7139
This commit is contained in:
Andy Scherzinger 2020-10-28 13:30:24 +01:00 committed by GitHub
commit 8b57f176a9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -83,6 +83,7 @@ import com.owncloud.android.ui.events.DummyDrawerEvent;
import com.owncloud.android.ui.events.SearchEvent;
import com.owncloud.android.ui.fragment.OCFileListFragment;
import com.owncloud.android.ui.fragment.PhotoFragment;
import com.owncloud.android.ui.preview.PreviewTextStringFragment;
import com.owncloud.android.ui.trashbin.TrashbinActivity;
import com.owncloud.android.utils.DisplayUtils;
import com.owncloud.android.utils.DrawerMenuUtil;
@ -329,9 +330,10 @@ public abstract class DrawerActivity extends ToolbarActivity
switch (menuItem.getItemId()) {
case R.id.nav_all_files:
showFiles(false);
if ((this instanceof FileDisplayActivity) &&
!(((FileDisplayActivity) this).getListOfFilesFragment() instanceof PhotoFragment)) {
!(((FileDisplayActivity) this).getLeftFragment() instanceof PhotoFragment) &&
!(((FileDisplayActivity) this).getLeftFragment() instanceof PreviewTextStringFragment)) {
showFiles(false);
((FileDisplayActivity) this).browseToRoot();
EventBus.getDefault().post(new ChangeMenuEvent());
} else {