topic_edit: Fix the behaviour of always_visible_topic_edit button.

The bug happens in the case when the topic name is not set and the
user clicks on always_visible_topic_edit button results into unusual
behaviour of the always_visible_topic_edit button. To fix this, this
commit fix the behaviour by hiding and showing the
always_visible_topic_edit button in the appropiate situations, at the
same time we hide/show similar buttons.

Fixes #17813.
This commit is contained in:
Nikhil Maske
2021-03-30 10:48:47 +05:30
committed by Tim Abbott
parent 78c7d749d9
commit 9f5efd208f

View File

@@ -331,6 +331,7 @@ export class MessageList {
recipient_row.find(".edit_content_button").hide();
recipient_row.find(".stream_topic").hide();
recipient_row.find(".topic_edit").show();
recipient_row.find(".always_visible_topic_edit").hide();
}
hide_edit_topic_on_recipient_row(recipient_row) {
@@ -339,6 +340,7 @@ export class MessageList {
recipient_row.find(".edit_content_button").show();
recipient_row.find(".topic_edit_form").empty();
recipient_row.find(".topic_edit").hide();
recipient_row.find(".always_visible_topic_edit").show();
}
show_message_as_read(message, options) {