mirror of
https://github.com/nextcloud/android.git
synced 2024-11-26 15:15:51 +03:00
Merge pull request #10217 from nextcloud/fix/on-device-crash
Fix crash when navigating from Gallery to On device
This commit is contained in:
commit
e7ea566bb6
2 changed files with 4 additions and 2 deletions
|
@ -2282,8 +2282,10 @@ public class FileDisplayActivity extends FileActivity
|
|||
updateActionBarTitleAndHomeButtonByString(getString(R.string.drawer_item_on_device));
|
||||
}
|
||||
OCFileListFragment ocFileListFragment = getListOfFilesFragment();
|
||||
if (ocFileListFragment != null) {
|
||||
if (ocFileListFragment != null && !(ocFileListFragment instanceof GalleryFragment) && !(ocFileListFragment instanceof SharedListFragment)) {
|
||||
ocFileListFragment.refreshDirectory();
|
||||
} else {
|
||||
setLeftFragment(new OCFileListFragment());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -410,7 +410,7 @@ public class OCFileListFragment extends ExtendedListFragment implements
|
|||
FileDisplayActivity fileDisplayActivity = (FileDisplayActivity) fragmentActivity;
|
||||
fileDisplayActivity.updateActionBarTitleAndHomeButton(fileDisplayActivity.getCurrentDir());
|
||||
}
|
||||
listDirectory(false, false);
|
||||
listDirectory(MainApp.isOnlyOnDevice(), false);
|
||||
}
|
||||
|
||||
protected void setAdapter(Bundle args) {
|
||||
|
|
Loading…
Reference in a new issue