Replace OwnCloudClient instances

Signed-off-by: ZetaTom <70907959+ZetaTom@users.noreply.github.com>
This commit is contained in:
ZetaTom 2024-01-30 11:33:05 +01:00 committed by tobiasKaminsky
parent 1a7847bbb5
commit 0afeffc1bb
No known key found for this signature in database
GPG key ID: 0E00D4D47D0C5AF7

View file

@ -282,12 +282,13 @@ class ChooseTemplateDialogFragment : DialogFragment(), View.OnClickListener, Tem
override fun doInBackground(vararg params: Void): String { override fun doInBackground(vararg params: Void): String {
return try { return try {
val client = clientFactory!!.create(user) val client = clientFactory!!.create(user)
val nextcloudClient = clientFactory.createNextcloudClient(user)
val result = DirectEditingCreateFileRemoteOperation( val result = DirectEditingCreateFileRemoteOperation(
path, path,
creator!!.editor, creator!!.editor,
creator.id, creator.id,
template.title template.title
).execute(client) ).execute(nextcloudClient)
if (!result.isSuccess) { if (!result.isSuccess) {
return "" return ""
} }
@ -352,7 +353,7 @@ class ChooseTemplateDialogFragment : DialogFragment(), View.OnClickListener, Tem
override fun doInBackground(vararg voids: Void): TemplateList { override fun doInBackground(vararg voids: Void): TemplateList {
return try { return try {
val client = clientFactory!!.create(user) val client = clientFactory!!.createNextcloudClient(user)
val result = DirectEditingObtainListOfTemplatesRemoteOperation( val result = DirectEditingObtainListOfTemplatesRemoteOperation(
creator!!.editor, creator!!.editor,
creator.id creator.id