Merge pull request #5754 from nextcloud/empty

Show loading instead of empty content
This commit is contained in:
Tobias Kaminsky 2020-04-08 07:49:18 +02:00 committed by GitHub
commit f8a5643eca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 2 deletions

View file

@ -1432,7 +1432,8 @@ public class FileDisplayActivity extends FileActivity
private void setBackgroundText() {
final OCFileListFragment ocFileListFragment = getListOfFilesFragment();
if (ocFileListFragment != null) {
if (mSyncInProgress) {
if (mSyncInProgress ||
getFile().getFileLength() > 0 && getStorageManager().getFolderContent(getFile(), false).isEmpty()) {
ocFileListFragment.setEmptyListLoadingMessage();
} else {
ocFileListFragment.setEmptyListMessage(ExtendedListFragment.SearchType.NO_SEARCH);

View file

@ -257,7 +257,6 @@ public class ExtendedListFragment extends Fragment implements
if (currentVisibility != oldVisibility) {
if (currentVisibility == View.VISIBLE) {
setEmptyListMessage(SearchType.REGULAR_FILTER);
} else {
setEmptyListMessage(SearchType.NO_SEARCH);

View file

@ -943,6 +943,7 @@ public class OCFileListFragment extends ExtendedListFragment implements
} else {
// update state and view of this fragment
searchFragment = false;
setEmptyListLoadingMessage();
listDirectory(file, MainApp.isOnlyOnDevice(), false);
// then, notify parent activity to let it update its state and view
mContainerActivity.onBrowsedDownTo(file);