Close the find dialog when the note is temporarily readable

This commit is contained in:
SiriusXT 2025-05-09 09:37:50 +08:00
parent 858814356a
commit fc50252e97

View File

@ -240,6 +240,12 @@ export default class FindWidget extends NoteContextAwareWidget {
}
}
async readOnlyTemporarilyDisabledEvent({ noteContext }: EventData<"readOnlyTemporarilyDisabled">) {
if (this.isNoteContext(noteContext.ntxId)) {
await this.closeSearch();
}
}
async getHandler() {
if (this.note?.type === "render") {
return this.htmlHandler;