Skip to content

Commit 7dd19bb

Browse files
committed
model [nfc]: Comment on lack of [AutocompleteViewManager.dispose]
1 parent d882f50 commit 7dd19bb

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lib/model/autocomplete.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,12 @@ class AutocompleteViewManager {
154154
view.reassemble();
155155
}
156156
}
157+
158+
// `dispose`? Hmm, no: we already have code calling `dispose` on the views in
159+
// [_mentionAutocompleteViews] when the [PerAccountStore] is replaced.
160+
// It's UI code, a [PerAccountStoreAwareStateMixin.onNewStore], and it would
161+
// be an error to call a [ChangeNotifier]'s dispose method twice. Discussion:
162+
// https://chat.zulip.org/#narrow/stream/243-mobile-team/topic/.60MentionAutocompleteView.2Edispose.60/near/1791292
157163
}
158164

159165
/// A view-model for a mention-autocomplete interaction.

0 commit comments

Comments
 (0)