FileDisplayActivity: always try to reload folder on onResume

This makes it so that the folder loads even without granting storage permission, which is the expected behaviour now

Signed-off-by: Álvaro Brey Vilas <alvaro.brey@nextcloud.com>
This commit is contained in:
Álvaro Brey Vilas 2022-03-14 17:39:21 +01:00
parent 2a4316a298
commit 1a9014ee3b
No known key found for this signature in database
GPG key ID: 2585783189A62105

View file

@ -1075,7 +1075,7 @@ public class FileDisplayActivity extends FileActivity
OCFileListFragment ocFileListFragment = (OCFileListFragment) leftFragment;
ocFileListFragment.setLoading(mSyncInProgress);
syncAndUpdateFolder(false);
syncAndUpdateFolder(false, true);
OCFile startFile = null;
if (getIntent() != null && getIntent().getParcelableExtra(EXTRA_FILE) != null) {
@ -2221,11 +2221,15 @@ public class FileDisplayActivity extends FileActivity
}
private void syncAndUpdateFolder(boolean ignoreETag) {
syncAndUpdateFolder(ignoreETag, false);
}
private void syncAndUpdateFolder(boolean ignoreETag, boolean ignoreFocus) {
OCFileListFragment listOfFiles = getListOfFilesFragment();
if (listOfFiles != null && !listOfFiles.isSearchFragment()) {
OCFile folder = listOfFiles.getCurrentFile();
if (folder != null) {
startSyncFolderOperation(folder, ignoreETag);
startSyncFolderOperation(folder, ignoreETag, ignoreFocus);
}
}
}