Skip to content

Commit b75f168

Browse files
gnpricechrisbobbe
authored andcommitted
msglist [nfc]: Rename fetchingMore status from fetchOlder
This matches the symmetry expressed in the description of busyFetchingMore and at the latter's call site in widgets code: whichever direction (older or newer) we might have a fetch request active in, the consequences we draw are the same in both directions.
1 parent 70c31c3 commit b75f168

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/model/message_list.dart

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ enum FetchingStatus {
7777
idle,
7878

7979
/// The model has an active `fetchOlder` request.
80-
fetchOlder,
80+
fetchingMore,
8181

8282
/// The model is in a backoff period from a failed request.
8383
backoff,
@@ -135,7 +135,7 @@ mixin _MessageSequence {
135135
/// This is true both when the recent request is still outstanding,
136136
/// and when it failed and the backoff from that is still in progress.
137137
bool get busyFetchingMore => switch (_status) {
138-
FetchingStatus.fetchOlder || FetchingStatus.backoff => true,
138+
FetchingStatus.fetchingMore || FetchingStatus.backoff => true,
139139
_ => false,
140140
};
141141

@@ -609,7 +609,7 @@ class MessageListView with ChangeNotifier, _MessageSequence {
609609
|| (narrow as TopicNarrow).with_ == null);
610610
assert(messages.isNotEmpty);
611611
assert(_status == FetchingStatus.idle);
612-
_status = FetchingStatus.fetchOlder;
612+
_status = FetchingStatus.fetchingMore;
613613
notifyListeners();
614614
final generation = this.generation;
615615
bool hasFetchError = false;
@@ -647,7 +647,7 @@ class MessageListView with ChangeNotifier, _MessageSequence {
647647
_haveOldest = result.foundOldest;
648648
} finally {
649649
if (this.generation == generation) {
650-
assert(_status == FetchingStatus.fetchOlder);
650+
assert(_status == FetchingStatus.fetchingMore);
651651
if (hasFetchError) {
652652
_status = FetchingStatus.backoff;
653653
unawaited((_fetchBackoffMachine ??= BackoffMachine())

0 commit comments

Comments
 (0)