Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions lib/widgets/compose_box.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2091,7 +2091,6 @@ class _ComposeBoxState extends State<ComposeBox> with PerAccountStoreAwareStateM
// Fetch-raw-content failed; abort the edit session.
// An error dialog was already shown, by fetchRawContentWithFeedback.
setState(() {
controller.dispose();
_setNewController(PerAccountStoreWidget.of(context));
});
return;
Expand Down Expand Up @@ -2119,7 +2118,6 @@ class _ComposeBoxState extends State<ComposeBox> with PerAccountStoreAwareStateM

final store = PerAccountStoreWidget.of(context);
setState(() {
controller.dispose();
_setNewController(store);
});
}
Expand All @@ -2144,6 +2142,7 @@ class _ComposeBoxState extends State<ComposeBox> with PerAccountStoreAwareStateM
}

void _setNewController(PerAccountStore store) {
_controller?.dispose(); // `?.` because this might be the first call
switch (widget.narrow) {
case ChannelNarrow():
_controller = StreamComposeBoxController(store: store);
Expand Down