message_lists: Set current to be undefined for non message view.

This commit is contained in:
Aman Agrawal
2024-02-05 18:03:29 +00:00
committed by Tim Abbott
parent 4ccf64b02b
commit f630272b4c
42 changed files with 194 additions and 56 deletions

View File

@@ -1,4 +1,5 @@
import $ from "jquery";
import assert from "minimalistic-assert";
import * as activity_ui from "./activity_ui";
import * as alert_words from "./alert_words";
@@ -547,6 +548,7 @@ export function dispatch_normal_event(event) {
stream.stream_id,
);
if (is_narrowed_to_stream) {
assert(message_lists.current !== undefined);
message_lists.current.update_trailing_bookend();
}
stream_data.delete_sub(stream.stream_id);