Merge pull request #11804 from nextcloud/nmc/fixShareFavCrash

Crash fix for shared and fav section
This commit is contained in:
Andy Scherzinger 2023-07-14 17:53:12 +02:00 committed by GitHub
commit 408a7475ef
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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();