Skip to content

Commit

Permalink
adapt to nextcloud code style
Browse files Browse the repository at this point in the history
Signed-off-by: grnd-alt <salimbelakkaf@outlook.de>
  • Loading branch information
grnd-alt committed Mar 28, 2024
1 parent 22919f8 commit 308b5bb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/Command/RenameTable.php
Original file line number Diff line number Diff line change
Expand Up @@ -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']);
Expand Down
8 changes: 4 additions & 4 deletions src/modules/main/sections/TableDescription.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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()
Expand Down

0 comments on commit 308b5bb

Please sign in to comment.