File tree Expand file tree Collapse file tree 1 file changed +15
-7
lines changed Expand file tree Collapse file tree 1 file changed +15
-7
lines changed Original file line number Diff line number Diff line change @@ -736,13 +736,21 @@ class _MessageListState extends State<MessageList> with PerAccountStoreAwareStat
736
736
}
737
737
738
738
Widget _buildEndCap () {
739
- return Column (crossAxisAlignment: CrossAxisAlignment .stretch, children: [
740
- TypingStatusWidget (narrow: widget.narrow),
741
- MarkAsReadWidget (narrow: widget.narrow),
742
- // To reinforce that the end of the feed has been reached:
743
- // https://chat.zulip.org/#narrow/stream/243-mobile-team/topic/flutter.3A.20Mark-as-read/near/1680603
744
- const SizedBox (height: 36 ),
745
- ]);
739
+ if (model.haveNewest) {
740
+ return Column (crossAxisAlignment: CrossAxisAlignment .stretch, children: [
741
+ TypingStatusWidget (narrow: widget.narrow),
742
+ // TODO perhaps offer mark-as-read even when not done fetching?
743
+ MarkAsReadWidget (narrow: widget.narrow),
744
+ // To reinforce that the end of the feed has been reached:
745
+ // https://chat.zulip.org/#narrow/stream/243-mobile-team/topic/flutter.3A.20Mark-as-read/near/1680603
746
+ const SizedBox (height: 36 ),
747
+ ]);
748
+ } else if (model.busyFetchingMore) {
749
+ // See [_buildStartCap] for why this condition shows a loading indicator.
750
+ return const _MessageListLoadingMore ();
751
+ } else {
752
+ return SizedBox .shrink ();
753
+ }
746
754
}
747
755
748
756
Widget _buildItem (MessageListItem data) {
You can’t perform that action at this time.
0 commit comments