From 58b387b99766f0739da4fef7025c6df0a2afdea9 Mon Sep 17 00:00:00 2001 From: ZetaTom <70907959+ZetaTom@users.noreply.github.com> Date: Mon, 27 Nov 2023 14:08:33 +0100 Subject: [PATCH 1/7] Deprecate OwncloudClient - DirectEditing Signed-off-by: ZetaTom <70907959+ZetaTom@users.noreply.github.com> --- .../owncloud/android/operations/RefreshFolderOperation.java | 4 ++-- .../android/ui/asynctasks/TextEditorLoadUrlTask.java | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/com/owncloud/android/operations/RefreshFolderOperation.java b/app/src/main/java/com/owncloud/android/operations/RefreshFolderOperation.java index 4fef8dc5cda0..aa76b4935e8f 100644 --- a/app/src/main/java/com/owncloud/android/operations/RefreshFolderOperation.java +++ b/app/src/main/java/com/owncloud/android/operations/RefreshFolderOperation.java @@ -324,8 +324,8 @@ private void updateCapabilities() { } private void updateDirectEditing(ArbitraryDataProvider arbitraryDataProvider, String newDirectEditingEtag) { - RemoteOperationResult result = new DirectEditingObtainRemoteOperation().execute(user, - mContext); + RemoteOperationResult result = + new DirectEditingObtainRemoteOperation().executeNextcloudClient(user, mContext); if (result.isSuccess()) { DirectEditing directEditing = result.getResultData(); diff --git a/app/src/main/java/com/owncloud/android/ui/asynctasks/TextEditorLoadUrlTask.java b/app/src/main/java/com/owncloud/android/ui/asynctasks/TextEditorLoadUrlTask.java index 9c946528e423..6b0d077ec97b 100644 --- a/app/src/main/java/com/owncloud/android/ui/asynctasks/TextEditorLoadUrlTask.java +++ b/app/src/main/java/com/owncloud/android/ui/asynctasks/TextEditorLoadUrlTask.java @@ -47,15 +47,15 @@ protected String doInBackground(Void... voids) { return ""; } - RemoteOperationResult result = new DirectEditingOpenFileRemoteOperation(file.getRemotePath(), editor.getId()) - .execute(user, editorWebViewWeakReference.get()); + RemoteOperationResult result = new DirectEditingOpenFileRemoteOperation(file.getRemotePath(), editor.getId()) + .executeNextcloudClient(user, editorWebViewWeakReference.get()); if (!result.isSuccess()) { return ""; } - return (String) result.getData().get(0); + return result.getResultData(); } @Override From 1a7847bbb53731dc42787e15b0cf69d8a416dbbf Mon Sep 17 00:00:00 2001 From: ZetaTom <70907959+ZetaTom@users.noreply.github.com> Date: Mon, 11 Dec 2023 11:24:03 +0100 Subject: [PATCH 2/7] Set library branch in build.gradle Signed-off-by: ZetaTom <70907959+ZetaTom@users.noreply.github.com> --- build.gradle | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index ccdbe63537d3..623cdd7cd9e5 100644 --- a/build.gradle +++ b/build.gradle @@ -10,7 +10,7 @@ */ buildscript { ext { - androidLibraryVersion = "cda1b08aa81b74201177f29c2326abee62f32c15" + androidLibraryVersion ="depocc/directediting-SNAPSHOT" androidPluginVersion = '8.4.0' androidxMediaVersion = '1.3.1' androidxTestVersion = "1.5.0" @@ -23,6 +23,8 @@ buildscript { jacoco_version = '0.8.12' kotlin_version = '2.0.0' markwonVersion = "4.6.2" + prismVersion = "2.0.0" + androidLibraryVersion = "master-SNAPSHOT" mockitoVersion = "4.11.0" mockitoKotlinVersion = "4.1.0" mockkVersion = "1.13.10" From 0afeffc1bb83eed34eae0b15549b7e4bd6a94c2b Mon Sep 17 00:00:00 2001 From: ZetaTom <70907959+ZetaTom@users.noreply.github.com> Date: Tue, 30 Jan 2024 11:33:05 +0100 Subject: [PATCH 3/7] Replace OwnCloudClient instances Signed-off-by: ZetaTom <70907959+ZetaTom@users.noreply.github.com> --- .../android/ui/dialog/ChooseTemplateDialogFragment.kt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/owncloud/android/ui/dialog/ChooseTemplateDialogFragment.kt b/app/src/main/java/com/owncloud/android/ui/dialog/ChooseTemplateDialogFragment.kt index 0329717c61d6..8f3bfeab0cb7 100644 --- a/app/src/main/java/com/owncloud/android/ui/dialog/ChooseTemplateDialogFragment.kt +++ b/app/src/main/java/com/owncloud/android/ui/dialog/ChooseTemplateDialogFragment.kt @@ -282,12 +282,13 @@ class ChooseTemplateDialogFragment : DialogFragment(), View.OnClickListener, Tem override fun doInBackground(vararg params: Void): String { return try { val client = clientFactory!!.create(user) + val nextcloudClient = clientFactory.createNextcloudClient(user) val result = DirectEditingCreateFileRemoteOperation( path, creator!!.editor, creator.id, template.title - ).execute(client) + ).execute(nextcloudClient) if (!result.isSuccess) { return "" } @@ -352,7 +353,7 @@ class ChooseTemplateDialogFragment : DialogFragment(), View.OnClickListener, Tem override fun doInBackground(vararg voids: Void): TemplateList { return try { - val client = clientFactory!!.create(user) + val client = clientFactory!!.createNextcloudClient(user) val result = DirectEditingObtainListOfTemplatesRemoteOperation( creator!!.editor, creator.id From 6f398e63e245ed3aa9800d272f103b48e9a5bed1 Mon Sep 17 00:00:00 2001 From: tobiasKaminsky Date: Tue, 11 Jun 2024 09:06:13 +0200 Subject: [PATCH 4/7] correct library Signed-off-by: tobiasKaminsky --- build.gradle | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 623cdd7cd9e5..422ceb5e526e 100644 --- a/build.gradle +++ b/build.gradle @@ -10,7 +10,7 @@ */ buildscript { ext { - androidLibraryVersion ="depocc/directediting-SNAPSHOT" + androidLibraryVersion = "depocc~directediting-SNAPSHOT" androidPluginVersion = '8.4.0' androidxMediaVersion = '1.3.1' androidxTestVersion = "1.5.0" @@ -24,7 +24,6 @@ buildscript { kotlin_version = '2.0.0' markwonVersion = "4.6.2" prismVersion = "2.0.0" - androidLibraryVersion = "master-SNAPSHOT" mockitoVersion = "4.11.0" mockitoKotlinVersion = "4.1.0" mockkVersion = "1.13.10" From 4bb1198b6e82cf936e6bd5ac625e57f45d5aa46e Mon Sep 17 00:00:00 2001 From: tobiasKaminsky Date: Tue, 11 Jun 2024 09:48:14 +0200 Subject: [PATCH 5/7] fix Signed-off-by: tobiasKaminsky --- .../owncloud/android/ui/asynctasks/TextEditorLoadUrlTask.java | 2 +- gradle/verification-metadata.xml | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/src/main/java/com/owncloud/android/ui/asynctasks/TextEditorLoadUrlTask.java b/app/src/main/java/com/owncloud/android/ui/asynctasks/TextEditorLoadUrlTask.java index 6b0d077ec97b..14c18dba9b72 100644 --- a/app/src/main/java/com/owncloud/android/ui/asynctasks/TextEditorLoadUrlTask.java +++ b/app/src/main/java/com/owncloud/android/ui/asynctasks/TextEditorLoadUrlTask.java @@ -48,7 +48,7 @@ protected String doInBackground(Void... voids) { } RemoteOperationResult result = new DirectEditingOpenFileRemoteOperation(file.getRemotePath(), editor.getId()) - .executeNextcloudClient(user, editorWebViewWeakReference.get()); + .executeNextcloudClient(user, editorWebView); if (!result.isSuccess()) { diff --git a/gradle/verification-metadata.xml b/gradle/verification-metadata.xml index ca062cae51db..9f868627316b 100644 --- a/gradle/verification-metadata.xml +++ b/gradle/verification-metadata.xml @@ -667,7 +667,8 @@ - + From 0f452104d55f7b84ecee8c87c00afedf5eed667a Mon Sep 17 00:00:00 2001 From: tobiasKaminsky Date: Tue, 11 Jun 2024 14:26:29 +0200 Subject: [PATCH 6/7] use correct library version Signed-off-by: tobiasKaminsky --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 422ceb5e526e..053e6c245683 100644 --- a/build.gradle +++ b/build.gradle @@ -10,7 +10,7 @@ */ buildscript { ext { - androidLibraryVersion = "depocc~directediting-SNAPSHOT" + androidLibraryVersion = "354911a81da973d8874381480ed0ea577e992572" androidPluginVersion = '8.4.0' androidxMediaVersion = '1.3.1' androidxTestVersion = "1.5.0" From 75db8c3fa65ab1e71ec16ecc2cd86a16ac784431 Mon Sep 17 00:00:00 2001 From: tobiasKaminsky Date: Wed, 12 Jun 2024 10:50:31 +0200 Subject: [PATCH 7/7] update verification-metadata.xml Signed-off-by: tobiasKaminsky --- gradle/verification-metadata.xml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/gradle/verification-metadata.xml b/gradle/verification-metadata.xml index 9f868627316b..193fa00ba6bd 100644 --- a/gradle/verification-metadata.xml +++ b/gradle/verification-metadata.xml @@ -5750,6 +5750,17 @@ + + + + + + + +