Skip to content

Commit a1b32f9

Browse files
committed
fixes
Signed-off-by: alperozturk96 <alper_ozturk@proton.me>
1 parent 49a1641 commit a1b32f9

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

app/src/main/java/com/owncloud/android/ui/activity/FileDisplayActivity.kt

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1346,6 +1346,8 @@ class FileDisplayActivity :
13461346
}
13471347

13481348
val ocFileListFragment = leftFragment
1349+
1350+
13491351
syncAndUpdateFolder(ignoreETag = true, ignoreFocus = true)
13501352

13511353
// Try to get the OCFile from the intent, if one was provided when launching this activity.
@@ -1355,17 +1357,20 @@ class FileDisplayActivity :
13551357
file = it
13561358
}
13571359

1360+
ocFileListFragment.setSearchArgs(ocFileListFragment.arguments)
1361+
13581362
// refresh list of files
13591363
if (searchView != null && !TextUtils.isEmpty(searchQuery)) {
13601364
searchView?.setQuery(searchQuery, false)
13611365
} else if (!ocFileListFragment.isSearchFragment && startFile == null) {
1362-
updateListOfFilesFragment()
1366+
ocFileListFragment.listDirectory(MainApp.isOnlyOnDevice())
13631367
ocFileListFragment.registerFabListener()
13641368
} else {
13651369
ocFileListFragment.listDirectory(startFile, false)
13661370
updateActionBarTitleAndHomeButton(startFile)
13671371
}
13681372

1373+
13691374
// show in-app review dialog to user
13701375
inAppReviewHelper.showInAppReview(this)
13711376

app/src/main/java/com/owncloud/android/ui/fragment/OCFileListFragment.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ public void onAttach(@NonNull Context context) {
309309
}
310310
}
311311

312-
private void setSearchArgs(Bundle state) {
312+
public void setSearchArgs(Bundle state) {
313313
SearchType argSearchType = NO_SEARCH;
314314
SearchEvent argSearchEvent = null;
315315

@@ -1783,6 +1783,10 @@ protected void setEmptyView(SearchEvent event) {
17831783
public void onMessageEvent(ChangeMenuEvent changeMenuEvent) {
17841784
Log_OC.d(TAG, "event bus --- change menu event triggered");
17851785

1786+
final var arguments = getArguments();
1787+
if (arguments != null) {
1788+
arguments.clear();
1789+
}
17861790
resetSearchAttributes();
17871791
resetMenuItems();
17881792

0 commit comments

Comments
 (0)