mirror of https://github.com/zulip/zulip.git
fetch_status: Add function to copy current status of msg list data.
This will be used to copy over status of superset data to the newly populated message list data.
This commit is contained in:
parent
1f11650275
commit
662f364283
|
@ -141,4 +141,15 @@ export class FetchStatus {
|
|||
max_id_for_messages(messages),
|
||||
);
|
||||
}
|
||||
|
||||
copy_status(fetch_status: FetchStatus): void {
|
||||
this._found_newest = fetch_status.has_found_newest();
|
||||
this._found_oldest = fetch_status.has_found_oldest();
|
||||
this._expected_max_message_id = fetch_status._expected_max_message_id;
|
||||
this._history_limited = fetch_status._history_limited;
|
||||
// We don't want to copy over the loading state of the message list
|
||||
// data since the same data object is not used for two messages lists
|
||||
// and hence when the fetch is finished, only the original message list
|
||||
// data will be updated.
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue