From d734ac9e450d306b169c219a2be542e243450e31 Mon Sep 17 00:00:00 2001 From: Elian Doran Date: Sun, 13 Apr 2025 21:52:56 +0300 Subject: [PATCH] fix(touchbar): hide read-only button after editing --- src/public/app/widgets/floating_buttons/edit_button.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/public/app/widgets/floating_buttons/edit_button.ts b/src/public/app/widgets/floating_buttons/edit_button.ts index 0b4d381fd..2a11f0d01 100644 --- a/src/public/app/widgets/floating_buttons/edit_button.ts +++ b/src/public/app/widgets/floating_buttons/edit_button.ts @@ -23,7 +23,6 @@ export default class EditButton extends OnClickButtonWidget { this.noteContext.viewScope.readOnlyTemporarilyDisabled = true; appContext.triggerEvent("readOnlyTemporarilyDisabled", { noteContext: this.noteContext }); } - this.refresh(); }); } @@ -68,6 +67,10 @@ export default class EditButton extends OnClickButtonWidget { } } + readOnlyTemporarilyDisabledEvent() { + this.refresh(); + } + async noteTypeMimeChangedEvent({ noteId }: { noteId: string }): Promise { if (this.isNote(noteId)) { await this.refresh();