From ebc67f6acd2ea47958cd478c32bac49968843d69 Mon Sep 17 00:00:00 2001 From: ZetaTom <70907959+ZetaTom@users.noreply.github.com> Date: Mon, 8 Jan 2024 12:57:15 +0100 Subject: [PATCH 1/5] Adapt OperationsService for NextcloudClient Signed-off-by: ZetaTom <70907959+ZetaTom@users.noreply.github.com> --- .../java/com/owncloud/android/services/OperationsService.java | 1 + 1 file changed, 1 insertion(+) diff --git a/app/src/main/java/com/owncloud/android/services/OperationsService.java b/app/src/main/java/com/owncloud/android/services/OperationsService.java index 4cf151b3f7..f7fa577966 100644 --- a/app/src/main/java/com/owncloud/android/services/OperationsService.java +++ b/app/src/main/java/com/owncloud/android/services/OperationsService.java @@ -30,6 +30,7 @@ import android.util.Pair; import com.nextcloud.client.account.User; import com.nextcloud.client.account.UserAccountManager; import com.nextcloud.common.NextcloudClient; +import com.nextcloud.java.util.Optional; import com.nextcloud.utils.extensions.IntentExtensionsKt; import com.owncloud.android.MainApp; import com.owncloud.android.datamodel.ArbitraryDataProvider; From c1d2d8af13f24a4045568430bde44913d3f4059d Mon Sep 17 00:00:00 2001 From: ZetaTom <70907959+ZetaTom@users.noreply.github.com> Date: Tue, 12 Dec 2023 14:42:18 +0100 Subject: [PATCH 2/5] Deprecate OwncloudClient - Comments Signed-off-by: ZetaTom <70907959+ZetaTom@users.noreply.github.com> --- .../android/operations/CommentFileOperation.java | 8 ++++---- .../ui/fragment/FileDetailActivitiesFragment.java | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/app/src/main/java/com/owncloud/android/operations/CommentFileOperation.java b/app/src/main/java/com/owncloud/android/operations/CommentFileOperation.java index 1a3efbac94..5984d17956 100644 --- a/app/src/main/java/com/owncloud/android/operations/CommentFileOperation.java +++ b/app/src/main/java/com/owncloud/android/operations/CommentFileOperation.java @@ -7,7 +7,7 @@ */ package com.owncloud.android.operations; -import com.owncloud.android.lib.common.OwnCloudClient; +import com.nextcloud.common.NextcloudClient; import com.owncloud.android.lib.common.operations.RemoteOperation; import com.owncloud.android.lib.common.operations.RemoteOperationResult; import com.owncloud.android.lib.common.utils.Log_OC; @@ -16,7 +16,7 @@ import com.owncloud.android.lib.resources.comments.CommentFileRemoteOperation; /** * Comment file */ -public class CommentFileOperation extends RemoteOperation { +public class CommentFileOperation extends RemoteOperation { private final String message; private final long fileId; @@ -37,8 +37,8 @@ public class CommentFileOperation extends RemoteOperation { * @param client Client object to communicate with the remote ownCloud server. */ @Override - protected RemoteOperationResult run(OwnCloudClient client) { - RemoteOperationResult result = new CommentFileRemoteOperation(message, fileId).execute(client); + public RemoteOperationResult run(NextcloudClient client) { + RemoteOperationResult result = new CommentFileRemoteOperation(message, fileId).execute(client); if (!result.isSuccess()) { Log_OC.e(this, "File with Id " + fileId + " could not be commented"); diff --git a/app/src/main/java/com/owncloud/android/ui/fragment/FileDetailActivitiesFragment.java b/app/src/main/java/com/owncloud/android/ui/fragment/FileDetailActivitiesFragment.java index d3a2af21dc..6069e4e6c0 100644 --- a/app/src/main/java/com/owncloud/android/ui/fragment/FileDetailActivitiesFragment.java +++ b/app/src/main/java/com/owncloud/android/ui/fragment/FileDetailActivitiesFragment.java @@ -183,8 +183,8 @@ public class FileDetailActivitiesFragment extends Fragment implements String trimmedComment = commentField.toString().trim(); - if (trimmedComment.length() > 0 && ownCloudClient != null && isDataFetched) { - new SubmitCommentTask(trimmedComment, file.getLocalId(), callback, ownCloudClient).execute(); + if (!trimmedComment.isEmpty() && nextcloudClient != null && isDataFetched) { + new SubmitCommentTask(trimmedComment, file.getLocalId(), callback, nextcloudClient).execute(); } } @@ -461,12 +461,12 @@ public class FileDetailActivitiesFragment extends Fragment implements private final String message; private final long fileId; private final VersionListInterface.CommentCallback callback; - private final OwnCloudClient client; + private final NextcloudClient client; private SubmitCommentTask(String message, long fileId, VersionListInterface.CommentCallback callback, - OwnCloudClient client) { + NextcloudClient client) { this.message = message; this.fileId = fileId; this.callback = callback; @@ -477,7 +477,7 @@ public class FileDetailActivitiesFragment extends Fragment implements protected Boolean doInBackground(Void... voids) { CommentFileOperation commentFileOperation = new CommentFileOperation(message, fileId); - RemoteOperationResult result = commentFileOperation.execute(client); + RemoteOperationResult result = commentFileOperation.execute(client); return result.isSuccess(); } From fb0a703d30402e629755f7b6cfcdebb246ab7434 Mon Sep 17 00:00:00 2001 From: ZetaTom <70907959+ZetaTom@users.noreply.github.com> Date: Tue, 30 Jan 2024 11:37:34 +0100 Subject: [PATCH 3/5] Set androidLibraryVersion Signed-off-by: ZetaTom <70907959+ZetaTom@users.noreply.github.com> --- build.gradle | 1 - 1 file changed, 1 deletion(-) diff --git a/build.gradle b/build.gradle index 053e6c2456..26737704d5 100644 --- a/build.gradle +++ b/build.gradle @@ -23,7 +23,6 @@ buildscript { jacoco_version = '0.8.12' kotlin_version = '2.0.0' markwonVersion = "4.6.2" - prismVersion = "2.0.0" mockitoVersion = "4.11.0" mockitoKotlinVersion = "4.1.0" mockkVersion = "1.13.10" From 82b596280c4e0fea83b03270e2a9b97d6bd62245 Mon Sep 17 00:00:00 2001 From: tobiasKaminsky Date: Tue, 11 Jun 2024 10:04:09 +0200 Subject: [PATCH 4/5] fix after rebase Signed-off-by: tobiasKaminsky --- .../java/com/owncloud/android/services/OperationsService.java | 1 - 1 file changed, 1 deletion(-) diff --git a/app/src/main/java/com/owncloud/android/services/OperationsService.java b/app/src/main/java/com/owncloud/android/services/OperationsService.java index f7fa577966..4cf151b3f7 100644 --- a/app/src/main/java/com/owncloud/android/services/OperationsService.java +++ b/app/src/main/java/com/owncloud/android/services/OperationsService.java @@ -30,7 +30,6 @@ import android.util.Pair; import com.nextcloud.client.account.User; import com.nextcloud.client.account.UserAccountManager; import com.nextcloud.common.NextcloudClient; -import com.nextcloud.java.util.Optional; import com.nextcloud.utils.extensions.IntentExtensionsKt; import com.owncloud.android.MainApp; import com.owncloud.android.datamodel.ArbitraryDataProvider; From 8fd50add8deda2afced9d8fda67a7e578fc5e6a8 Mon Sep 17 00:00:00 2001 From: tobiasKaminsky Date: Wed, 12 Jun 2024 15:48:13 +0200 Subject: [PATCH 5/5] set library hash Signed-off-by: tobiasKaminsky --- build.gradle | 2 +- gradle/verification-metadata.xml | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 26737704d5..18405f9728 100644 --- a/build.gradle +++ b/build.gradle @@ -10,7 +10,7 @@ */ buildscript { ext { - androidLibraryVersion = "354911a81da973d8874381480ed0ea577e992572" + androidLibraryVersion = "84711877b4703f8df3d638a016419b4aa731db2b" androidPluginVersion = '8.4.0' androidxMediaVersion = '1.3.1' androidxTestVersion = "1.5.0" diff --git a/gradle/verification-metadata.xml b/gradle/verification-metadata.xml index 3eeac71bb4..e0ec9fe5bc 100644 --- a/gradle/verification-metadata.xml +++ b/gradle/verification-metadata.xml @@ -5792,6 +5792,17 @@ + + + + + + + +