From 308b5bbd9eb2a9ab01f282551d2c9c82ffe6ae1c Mon Sep 17 00:00:00 2001 From: grnd-alt Date: Thu, 28 Mar 2024 09:05:43 +0100 Subject: [PATCH] adapt to nextcloud code style Signed-off-by: grnd-alt --- lib/Command/RenameTable.php | 2 +- src/modules/main/sections/TableDescription.vue | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/Command/RenameTable.php b/lib/Command/RenameTable.php index 098cace43..d492cec77 100644 --- a/lib/Command/RenameTable.php +++ b/lib/Command/RenameTable.php @@ -85,7 +85,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int $description = $input->getOption('description'); try { - $table = $this->tableService->update($id, $title, $emoji, null, $archived, ''); + $table = $this->tableService->update($id, $title, $emoji, $description, $archived, ''); $arr = $table->jsonSerialize(); unset($arr['hasShares']); diff --git a/src/modules/main/sections/TableDescription.vue b/src/modules/main/sections/TableDescription.vue index 421e4d2b7..6a29a9272 100644 --- a/src/modules/main/sections/TableDescription.vue +++ b/src/modules/main/sections/TableDescription.vue @@ -91,7 +91,9 @@ export default { this.editor.setReadOnly(true) }, async saveDescription() { - if (this.descriptionLastEdited !== 0 || this.description === this.activeElement.description || !this.canManageElement(this.activeElement)) return + if (this.descriptionLastEdited !== 0 || this.description === this.activeElement.description || !this.canManageElement(this.activeElement)) { + return + } this.descriptionSaving = true await this.$store.dispatch('updateTableProperty', { id: this.activeElement.id, data: { description: this.description }, property: 'description' }) this.descriptionLastEdit = 0 @@ -100,9 +102,7 @@ export default { updateDescription() { this.descriptionLastEdit = Date.now() clearTimeout(this.descriptionSaveTimeout) - this.descriptionSaveTimeout = setTimeout(async () => { - await this.saveDescription() - }, 1000) + this.descriptionSaveTimeout = setTimeout(this.saveDescription, 1000) }, async destroyEditor() { await this.saveDescription()