From a75af065f912ee8080cf5992fd70efe1bf945c96 Mon Sep 17 00:00:00 2001 From: ZetaTom <70907959+ZetaTom@users.noreply.github.com> Date: Wed, 21 Jun 2023 15:59:20 +0200 Subject: [PATCH] Fix crash when emptying bin Signed-off-by: ZetaTom <70907959+ZetaTom@users.noreply.github.com> --- .../android/ui/trashbin/RemoteTrashbinRepository.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/owncloud/android/ui/trashbin/RemoteTrashbinRepository.java b/app/src/main/java/com/owncloud/android/ui/trashbin/RemoteTrashbinRepository.java index 70bdf17fcb..8e1a6be845 100644 --- a/app/src/main/java/com/owncloud/android/ui/trashbin/RemoteTrashbinRepository.java +++ b/app/src/main/java/com/owncloud/android/ui/trashbin/RemoteTrashbinRepository.java @@ -27,6 +27,7 @@ import android.os.AsyncTask; import com.nextcloud.client.account.User; import com.nextcloud.client.network.ClientFactory; +import com.nextcloud.common.NextcloudClient; import com.owncloud.android.R; import com.owncloud.android.lib.common.OwnCloudClient; import com.owncloud.android.lib.common.operations.RemoteOperationResult; @@ -112,9 +113,9 @@ public class RemoteTrashbinRepository implements TrashbinRepository { @Override protected Boolean doInBackground(Void... voids) { try { - OwnCloudClient client = clientFactory.create(user); + NextcloudClient client = clientFactory.createNextcloudClient(user); EmptyTrashbinRemoteOperation emptyTrashbinFileOperation = new EmptyTrashbinRemoteOperation(); - RemoteOperationResult result = emptyTrashbinFileOperation.execute(client); + RemoteOperationResult result = emptyTrashbinFileOperation.execute(client); return result.isSuccess(); } catch (ClientFactory.CreationException e) { Log_OC.e(this, "Cannot create client", e);