|
@@ -812,6 +812,8 @@ public class FileDisplayActivity extends FileActivity
|
|
|
second != null && second.getFile() != null ||
|
|
|
isSearchOpen()) {
|
|
|
onBackPressed();
|
|
|
+ } else if (getLeftFragment() instanceof FileDetailFragment) {
|
|
|
+ onBackPressed();
|
|
|
} else {
|
|
|
openDrawer();
|
|
|
}
|
|
@@ -1571,18 +1573,10 @@ public class FileDisplayActivity extends FileActivity
|
|
|
public void showDetails(OCFile file, int activeTab) {
|
|
|
User currentUser = getUser().orElseThrow(RuntimeException::new);
|
|
|
Fragment detailFragment = FileDetailFragment.newInstance(file, currentUser, activeTab);
|
|
|
- setSecondFragment(detailFragment);
|
|
|
-
|
|
|
- OCFileListFragment listOfFiles = getListOfFilesFragment();
|
|
|
- if (listOfFiles != null) {
|
|
|
- resetHeaderScrollingState();
|
|
|
- showSortListGroup(false);
|
|
|
- listOfFiles.setFabVisible(false);
|
|
|
- }
|
|
|
+ setLeftFragment(detailFragment);
|
|
|
|
|
|
- updateFragmentsVisibility(true);
|
|
|
updateActionBarTitleAndHomeButton(file);
|
|
|
- setFile(file);
|
|
|
+ mDrawerToggle.setDrawerIndicatorEnabled(false);
|
|
|
}
|
|
|
|
|
|
private void resetHeaderScrollingState() {
|
|
@@ -1818,21 +1812,6 @@ public class FileDisplayActivity extends FileActivity
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * Shortcut to get access to the {@link FileDetailFragment} instance, if any
|
|
|
- *
|
|
|
- * @return A {@link FileDetailFragment} instance, or null
|
|
|
- */
|
|
|
- private FileDetailFragment getShareFileFragment() {
|
|
|
- Fragment fragment = getSupportFragmentManager().findFragmentByTag(TAG_SECOND_FRAGMENT);
|
|
|
-
|
|
|
- if (fragment instanceof FileDetailFragment) {
|
|
|
- return (FileDetailFragment) fragment;
|
|
|
- } else {
|
|
|
- return null;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
/**
|
|
|
* Updates the view associated to the activity after the finish of an operation trying to copy a
|
|
|
* file.
|