use userId for webdav search

Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
This commit is contained in:
tobiasKaminsky 2018-04-23 10:34:25 +02:00
parent 1bf915bc8b
commit a52b75eeed
No known key found for this signature in database
GPG key ID: 0E00D4D47D0C5AF7

View file

@ -1514,6 +1514,8 @@ public class OCFileListFragment extends ExtendedListFragment implements OCFileLi
new Handler(Looper.getMainLooper()).post(switchViewsRunnable);
}
final Account currentAccount = AccountUtils.getCurrentOwnCloudAccount(MainApp.getAppContext());
final RemoteOperation remoteOperation;
if (!currentSearchType.equals(SearchType.SHARED_FILTER)) {
boolean searchOnlyFolders = false;
@ -1521,13 +1523,15 @@ public class OCFileListFragment extends ExtendedListFragment implements OCFileLi
searchOnlyFolders = true;
}
remoteOperation = new SearchOperation(event.getSearchQuery(), event.getSearchType(), searchOnlyFolders);
String userId = AccountManager.get(MainApp.getAppContext()).getUserData(currentAccount,
com.owncloud.android.lib.common.accounts.AccountUtils.Constants.KEY_USER_ID);
remoteOperation = new SearchOperation(event.getSearchQuery(), event.getSearchType(), searchOnlyFolders,
userId);
} else {
remoteOperation = new GetRemoteSharesOperation();
}
final Account currentAccount = AccountUtils.getCurrentOwnCloudAccount(MainApp.getAppContext());
remoteOperationAsyncTask = new AsyncTask() {
@Override
protected Object doInBackground(Object[] params) {