Skip to content

Commit 7ad6177

Browse files
committed
msglist [nfc]: Make explicit that we don't have loading indicators at bottom
We're already relying on this assumption in the code to add a new message, in _processMessage. We'll add the needed complications there when they become needed.
1 parent ecfa4c7 commit 7ad6177

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/model/message_list.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,15 @@ class MessageListMessageItem extends MessageListItem {
2727
MessageListMessageItem(this.message, this.content);
2828
}
2929

30-
/// Indicates the app is loading more messages at the top or bottom.
30+
/// Indicates the app is loading more messages at the top.
31+
// TODO(#80): or loading at the bottom, by adding a [MessageListDirection.newer]
3132
class MessageListLoadingItem extends MessageListItem {
3233
final MessageListDirection direction;
3334

3435
const MessageListLoadingItem(this.direction);
3536
}
3637

37-
enum MessageListDirection { older, newer }
38+
enum MessageListDirection { older }
3839

3940
/// Indicates we've reached the oldest message in the narrow.
4041
class MessageListHistoryStartItem extends MessageListItem {
@@ -102,7 +103,6 @@ mixin _MessageSequence {
102103
case MessageListLoadingItem():
103104
switch (item.direction) {
104105
case MessageListDirection.older: return -1;
105-
case MessageListDirection.newer: return 1;
106106
}
107107
case MessageListMessageItem(:var message): return message.id.compareTo(messageId);
108108
}

0 commit comments

Comments
 (0)