mirror of
https://github.com/nextcloud/android.git
synced 2024-11-27 09:39:25 +03:00
Fix shared and fav section crash by avoiding multiple api calls.
This commit is contained in:
parent
67adaa6fea
commit
e290a0a240
1 changed files with 8 additions and 0 deletions
|
@ -6,9 +6,11 @@
|
|||
* @author David A. Velasco
|
||||
* @author Andy Scherzinger
|
||||
* @author Chris Narkiewicz
|
||||
* @author TSI-mc
|
||||
* Copyright (C) 2011 Bartek Przybylski
|
||||
* Copyright (C) 2016 ownCloud Inc.
|
||||
* Copyright (C) 2018 Andy Scherzinger
|
||||
* Copyright (C) 2023 TSI-mc
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2,
|
||||
|
@ -1657,6 +1659,12 @@ public class OCFileListFragment extends ExtendedListFragment implements
|
|||
return;
|
||||
}
|
||||
|
||||
// avoid calling api multiple times if async task is already executing
|
||||
if (remoteOperationAsyncTask != null && remoteOperationAsyncTask.getStatus() != AsyncTask.Status.FINISHED) {
|
||||
Log_OC.d(TAG, "OCFileListSearchAsyncTask already running skipping new api call for search event: " + searchEvent.getSearchType());
|
||||
return;
|
||||
}
|
||||
|
||||
prepareCurrentSearch(event);
|
||||
searchFragment = true;
|
||||
setEmptyListLoadingMessage();
|
||||
|
|
Loading…
Reference in a new issue