message_edit: Don't offer UI to edit topics after time limit.

This fixes a couple places where with community topic editing, we'd
show the edit-topic UI basically indefinitely.
This commit is contained in:
Shubham Dhama
2018-04-26 02:45:57 +05:30
committed by Tim Abbott
parent da8157d414
commit 689c717284
2 changed files with 2 additions and 2 deletions

View File

@@ -87,7 +87,7 @@ function set_topic_edit_properties(group, message) {
// to encourage updating them. Admins can also edit any topic.
if (message.subject === compose.empty_topic_placeholder()) {
group.always_visible_topic_edit = true;
} else if (page_params.is_admin || page_params.realm_allow_community_topic_editing) {
} else if (page_params.is_admin || message_edit.is_topic_editable(message)) {
group.on_hover_topic_edit = true;
}
}

View File

@@ -34,7 +34,7 @@ function message_hover(message_row) {
message_row.addClass('message_hovered');
current_message_hover = message_row;
if (!message.sent_by_me && !page_params.realm_allow_community_topic_editing) {
if (!message_edit.is_topic_editable(message)) {
// The actions and reactions icon hover logic is handled entirely by CSS
return;
}