fix(touchbar): hide read-only button after editing

This commit is contained in:
Elian Doran 2025-04-13 21:52:56 +03:00
parent cbc6e74d64
commit d734ac9e45
No known key found for this signature in database

View File

@ -23,7 +23,6 @@ export default class EditButton extends OnClickButtonWidget {
this.noteContext.viewScope.readOnlyTemporarilyDisabled = true; this.noteContext.viewScope.readOnlyTemporarilyDisabled = true;
appContext.triggerEvent("readOnlyTemporarilyDisabled", { noteContext: this.noteContext }); 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<void> { async noteTypeMimeChangedEvent({ noteId }: { noteId: string }): Promise<void> {
if (this.isNote(noteId)) { if (this.isNote(noteId)) {
await this.refresh(); await this.refresh();