diff --git a/app/src/main/java/com/owncloud/android/ui/activity/FileDisplayActivity.java b/app/src/main/java/com/owncloud/android/ui/activity/FileDisplayActivity.java index acb06c3f50ba..75fef3461d96 100644 --- a/app/src/main/java/com/owncloud/android/ui/activity/FileDisplayActivity.java +++ b/app/src/main/java/com/owncloud/android/ui/activity/FileDisplayActivity.java @@ -2486,6 +2486,7 @@ private void setSortListGroup(boolean currentListGroupVisibility, boolean show) */ private void popSortListGroupVisibility() { if (previousSortGroupState.isEmpty()) { + showSortListGroup(false); return; } diff --git a/app/src/main/java/com/owncloud/android/ui/adapter/OCFileListAdapter.java b/app/src/main/java/com/owncloud/android/ui/adapter/OCFileListAdapter.java index 00f9e2933d17..a7165f3cf824 100644 --- a/app/src/main/java/com/owncloud/android/ui/adapter/OCFileListAdapter.java +++ b/app/src/main/java/com/owncloud/android/ui/adapter/OCFileListAdapter.java @@ -74,6 +74,7 @@ import com.owncloud.android.operations.RefreshFolderOperation; import com.owncloud.android.operations.RemoteOperationFailedException; import com.owncloud.android.ui.activity.ComponentsGetter; +import com.owncloud.android.ui.activity.FileDisplayActivity; import com.owncloud.android.ui.fragment.SearchType; import com.owncloud.android.ui.interfaces.OCFileListFragmentInterface; import com.owncloud.android.ui.preview.PreviewTextFragment; @@ -160,6 +161,10 @@ public OCFileListAdapter( this.gridView = gridView; mStorageManager = transferServiceGetter.getStorageManager(); + if (activity instanceof FileDisplayActivity) { + ((FileDisplayActivity) activity).showSortListGroup(true); + } + if (mStorageManager == null) { mStorageManager = new FileDataStorageManager(user, activity.getContentResolver()); }