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 1a3efbac9469..5984d179563c 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 @@ /** * 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 CommentFileOperation(String message, long fileId) { * @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 d3a2af21dcab..6069e4e6c02a 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 void submitComment() { 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 @@ private static class SubmitCommentTask extends AsyncTask { 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 @@ private SubmitCommentTask(String message, protected Boolean doInBackground(Void... voids) { CommentFileOperation commentFileOperation = new CommentFileOperation(message, fileId); - RemoteOperationResult result = commentFileOperation.execute(client); + RemoteOperationResult result = commentFileOperation.execute(client); return result.isSuccess(); } diff --git a/build.gradle b/build.gradle index 053e6c245683..18405f972899 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" @@ -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" diff --git a/gradle/verification-metadata.xml b/gradle/verification-metadata.xml index 3eeac71bb401..e0ec9fe5bc06 100644 --- a/gradle/verification-metadata.xml +++ b/gradle/verification-metadata.xml @@ -5792,6 +5792,17 @@ + + + + + + + +