mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 13:03:29 +00:00
message_list_view: Add starred_status to message objs.
This starred_status property can be used to provide the context in the single_message.handlebars template to show the proper tooltip.
This commit is contained in:
@@ -455,7 +455,15 @@ MessageListView.prototype = {
|
||||
// all messages lists. To prevent having both list views overwriting
|
||||
// each others data we will make a new message object to add data to
|
||||
// for rendering.
|
||||
message_containers = _.map(messages, function (message) { return {msg: message}; });
|
||||
message_containers = _.map(messages, function (message) {
|
||||
if (message.starred) {
|
||||
message.starred_status = i18n.t("Unstar");
|
||||
} else {
|
||||
message.starred_status = i18n.t("Star");
|
||||
}
|
||||
|
||||
return {msg: message};
|
||||
});
|
||||
|
||||
function save_scroll_position() {
|
||||
if (orig_scrolltop_offset === undefined && self.selected_row().length > 0) {
|
||||
|
||||
Reference in New Issue
Block a user