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 @@ -745,13 +745,21 @@ class _MessageListState extends State<MessageList> with PerAccountStoreAwareStat
745
745
}
746
746
747
747
Widget _buildEndCap () {
748
- return Column (crossAxisAlignment: CrossAxisAlignment .stretch, children: [
749
- TypingStatusWidget (narrow: widget.narrow),
750
- MarkAsReadWidget (narrow: widget.narrow),
751
- // To reinforce that the end of the feed has been reached:
752
- // https://chat.zulip.org/#narrow/stream/243-mobile-team/topic/flutter.3A.20Mark-as-read/near/1680603
753
- const SizedBox (height: 36 ),
754
- ]);
748
+ if (model.haveNewest) {
749
+ return Column (crossAxisAlignment: CrossAxisAlignment .stretch, children: [
750
+ TypingStatusWidget (narrow: widget.narrow),
751
+ // TODO perhaps offer mark-as-read even when not done fetching?
752
+ MarkAsReadWidget (narrow: widget.narrow),
753
+ // To reinforce that the end of the feed has been reached:
754
+ // https://chat.zulip.org/#narrow/stream/243-mobile-team/topic/flutter.3A.20Mark-as-read/near/1680603
755
+ const SizedBox (height: 36 ),
756
+ ]);
757
+ } else if (model.busyFetchingMore) {
758
+ // See [_buildStartCap] for why this condition shows a loading indicator.
759
+ return const _MessageListLoadingMore ();
760
+ } else {
761
+ return SizedBox .shrink ();
762
+ }
755
763
}
756
764
757
765
Widget _buildItem (MessageListItem data) {
You can’t perform that action at this time.
0 commit comments