Skip to content

Commit cb832ad

Browse files
committed
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 8641e39 commit cb832ad

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
@@ -76,7 +76,7 @@ enum FetchingStatus {
7676
idle,
7777

7878
/// The model has an active `fetchOlder` request.
79-
fetchOlder,
79+
fetchingMore,
8080

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

@@ -579,7 +579,7 @@ class MessageListView with ChangeNotifier, _MessageSequence {
579579
|| (narrow as TopicNarrow).with_ == null);
580580
assert(messages.isNotEmpty);
581581
assert(_status == FetchingStatus.idle);
582-
_status = FetchingStatus.fetchOlder;
582+
_status = FetchingStatus.fetchingMore;
583583
notifyListeners();
584584
final generation = this.generation;
585585
bool hasFetchError = false;
@@ -617,7 +617,7 @@ class MessageListView with ChangeNotifier, _MessageSequence {
617617
_haveOldest = result.foundOldest;
618618
} finally {
619619
if (this.generation == generation) {
620-
assert(_status == FetchingStatus.fetchOlder);
620+
assert(_status == FetchingStatus.fetchingMore);
621621
if (hasFetchError) {
622622
_status = FetchingStatus.backoff;
623623
unawaited((_fetchBackoffMachine ??= BackoffMachine())

0 commit comments

Comments
 (0)