File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -137,6 +137,16 @@ abstract class MessageListPageState extends State<MessageListPage> {
137137 /// The narrow for this page's message list.
138138 Narrow get narrow;
139139
140+ /// Resets the [MessageListView] model, triggering an initial fetch
141+ /// at [anchor] .
142+ ///
143+ /// Useful when updates won't arrive through the event system,
144+ /// as when showing an unsubscribed channel.
145+ /// (New-message events aren't sent for unsubscribed channels.)
146+ ///
147+ /// Does nothing if [MessageList] has not mounted yet.
148+ void refresh (Anchor anchor);
149+
140150 /// The [ComposeBoxState] for this [MessageListPage] 's compose box,
141151 /// if this [MessageListPage] offers a compose box and it has mounted,
142152 /// else null.
@@ -267,6 +277,9 @@ class _MessageListPageState extends State<MessageListPage> implements MessageLis
267277 @override
268278 late Narrow narrow;
269279
280+ @override
281+ void refresh (Anchor anchor) => model? .renarrowAndFetch (narrow, anchor);
282+
270283 @override
271284 ComposeBoxState ? get composeBoxState => _composeBoxKey.currentState;
272285 final GlobalKey <ComposeBoxState > _composeBoxKey = GlobalKey ();
You can’t perform that action at this time.
0 commit comments