From f01aa28fc21565daeeeb8a46ec9b6da1ea1c4c66 Mon Sep 17 00:00:00 2001 From: A117870935 Date: Thu, 13 Apr 2023 20:15:55 +0530 Subject: [PATCH 1/2] Avoid search collapsing after refresh. --- .../com/owncloud/android/ui/fragment/OCFileListFragment.java | 5 ----- 1 file changed, 5 deletions(-) diff --git a/app/src/main/java/com/owncloud/android/ui/fragment/OCFileListFragment.java b/app/src/main/java/com/owncloud/android/ui/fragment/OCFileListFragment.java index 67e25f01ecff..3654c33fda27 100644 --- a/app/src/main/java/com/owncloud/android/ui/fragment/OCFileListFragment.java +++ b/app/src/main/java/com/owncloud/android/ui/fragment/OCFileListFragment.java @@ -1343,15 +1343,10 @@ public void listDirectory(OCFile directory, OCFile file, boolean onlyOnDevice, b if (searchView != null && !searchView.isIconified() && !fromSearch) { searchView.post(() -> { searchView.setQuery("", false); - searchView.onActionViewCollapsed(); Activity activity; if ((activity = getActivity()) != null && activity instanceof FileDisplayActivity) { FileDisplayActivity fileDisplayActivity = (FileDisplayActivity) activity; fileDisplayActivity.hideSearchView(fileDisplayActivity.getCurrentDir()); - if (getCurrentFile() != null) { - fileDisplayActivity - .setDrawerIndicatorEnabled(fileDisplayActivity.isRoot(getCurrentFile())); - } } }); } From 905222c930831171068d0b1291115eb8b539db56 Mon Sep 17 00:00:00 2001 From: A200073727 Date: Wed, 19 Apr 2023 15:35:40 +0530 Subject: [PATCH 2/2] After screen refresh search is no longer collapsing. --- .../android/ui/fragment/OCFileListFragment.java | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/app/src/main/java/com/owncloud/android/ui/fragment/OCFileListFragment.java b/app/src/main/java/com/owncloud/android/ui/fragment/OCFileListFragment.java index 3654c33fda27..e7745f3ba368 100644 --- a/app/src/main/java/com/owncloud/android/ui/fragment/OCFileListFragment.java +++ b/app/src/main/java/com/owncloud/android/ui/fragment/OCFileListFragment.java @@ -1340,17 +1340,6 @@ public void listDirectory(OCFile directory, OCFile file, boolean onlyOnDevice, b } } - if (searchView != null && !searchView.isIconified() && !fromSearch) { - searchView.post(() -> { - searchView.setQuery("", false); - Activity activity; - if ((activity = getActivity()) != null && activity instanceof FileDisplayActivity) { - FileDisplayActivity fileDisplayActivity = (FileDisplayActivity) activity; - fileDisplayActivity.hideSearchView(fileDisplayActivity.getCurrentDir()); - } - }); - } - mAdapter.swapDirectory( accountManager.getUser(), directory,