mirror of
https://github.com/nextcloud/android.git
synced 2024-11-26 23:28:42 +03:00
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:
parent
2a4316a298
commit
1a9014ee3b
1 changed files with 6 additions and 2 deletions
|
@ -1075,7 +1075,7 @@ public class FileDisplayActivity extends FileActivity
|
||||||
OCFileListFragment ocFileListFragment = (OCFileListFragment) leftFragment;
|
OCFileListFragment ocFileListFragment = (OCFileListFragment) leftFragment;
|
||||||
|
|
||||||
ocFileListFragment.setLoading(mSyncInProgress);
|
ocFileListFragment.setLoading(mSyncInProgress);
|
||||||
syncAndUpdateFolder(false);
|
syncAndUpdateFolder(false, true);
|
||||||
|
|
||||||
OCFile startFile = null;
|
OCFile startFile = null;
|
||||||
if (getIntent() != null && getIntent().getParcelableExtra(EXTRA_FILE) != null) {
|
if (getIntent() != null && getIntent().getParcelableExtra(EXTRA_FILE) != null) {
|
||||||
|
@ -2221,11 +2221,15 @@ public class FileDisplayActivity extends FileActivity
|
||||||
}
|
}
|
||||||
|
|
||||||
private void syncAndUpdateFolder(boolean ignoreETag) {
|
private void syncAndUpdateFolder(boolean ignoreETag) {
|
||||||
|
syncAndUpdateFolder(ignoreETag, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void syncAndUpdateFolder(boolean ignoreETag, boolean ignoreFocus) {
|
||||||
OCFileListFragment listOfFiles = getListOfFilesFragment();
|
OCFileListFragment listOfFiles = getListOfFilesFragment();
|
||||||
if (listOfFiles != null && !listOfFiles.isSearchFragment()) {
|
if (listOfFiles != null && !listOfFiles.isSearchFragment()) {
|
||||||
OCFile folder = listOfFiles.getCurrentFile();
|
OCFile folder = listOfFiles.getCurrentFile();
|
||||||
if (folder != null) {
|
if (folder != null) {
|
||||||
startSyncFolderOperation(folder, ignoreETag);
|
startSyncFolderOperation(folder, ignoreETag, ignoreFocus);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue