Watch
1
0
Fork
You've already forked nexus
0
forked from Nexus/nexus

add some more safety checks to composer

This commit is contained in:
Henry Hiles 2026-11-06 10:45:53 -05:00
commit 06ba23d3c0
Signed by: Henry-Hiles
SSH key fingerprint: SHA256:VKQUdS31Q90KvX7EkKMHMBpUspcmItAh86a+v7PGiIs

View file

@ -204,7 +204,12 @@ class const Composer(
// the controller, which is also told about the draft being restored
// during the build
void onFormattedTextChanged(String text) {
if (text == ref.read(draftProvider).text) return;
final draft = ref.read(draftProvider);
if (text == draft.text ||
(draft.isEditing ? draft.relatedEvent : null) != editingEvent) {
return;
}
draftNotifier.update(
(draft) => draft.copyWith(text: text, tags: controller.tags.toIList()),
);