From ffd1c373aff66ea770b045e678621a8c07e8de77 Mon Sep 17 00:00:00 2001 From: alperozturk Date: Mon, 12 Feb 2024 14:47:28 +0100 Subject: [PATCH] Show sort list group for file list Signed-off-by: alperozturk --- .../owncloud/android/ui/activity/FileDisplayActivity.java | 1 + .../com/owncloud/android/ui/adapter/OCFileListAdapter.java | 5 +++++ 2 files changed, 6 insertions(+) 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()); }