js: Move current_msg_list, home_msg_list to ES6 module message_lists.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2021-03-29 17:21:21 -07:00
committed by Tim Abbott
parent fbf5ff26af
commit d43ac7357a
61 changed files with 409 additions and 363 deletions

View File

@@ -8,6 +8,7 @@ import * as blueslip from "./blueslip";
import * as channel from "./channel";
import * as emoji_picker from "./emoji_picker";
import {i18n} from "./i18n";
import * as message_lists from "./message_lists";
import * as message_store from "./message_store";
import {page_params} from "./page_params";
import * as people from "./people";
@@ -19,17 +20,17 @@ export function get_local_reaction_id(reaction_info) {
}
export function open_reactions_popover() {
const message = current_msg_list.selected_message();
const message = message_lists.current.selected_message();
let target;
// Use verbose style to ensure we test both sides of the condition.
if (message.sent_by_me) {
target = $(current_msg_list.selected_row()).find(".actions_hover")[0];
target = $(message_lists.current.selected_row()).find(".actions_hover")[0];
} else {
target = $(current_msg_list.selected_row()).find(".reaction_button")[0];
target = $(message_lists.current.selected_row()).find(".reaction_button")[0];
}
emoji_picker.toggle_emoji_popover(target, current_msg_list.selected_id());
emoji_picker.toggle_emoji_popover(target, message_lists.current.selected_id());
return true;
}