mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 05:53:43 +00:00
Split selecting a message and hiding the empty narrow message
We should hide the empty narrow message message whenever the narrow is not empty, but we should only select a message if non are currently selected. (imported from commit 22f6b0827dc84ed587a83b5d713b12c1d5d4c0a0)
This commit is contained in:
@@ -73,12 +73,15 @@ MessageList.prototype = {
|
||||
self.append(bottom_messages, opts);
|
||||
}
|
||||
|
||||
if ((self === narrowed_msg_list) && !self.empty() &&
|
||||
!opts.delay_render) {
|
||||
if ((self === narrowed_msg_list) && !self.empty()) {
|
||||
// If adding some new messages to the message tables caused
|
||||
// our current narrow to no longer be empty, hide the empty
|
||||
// feed placeholder text.
|
||||
narrow.hide_empty_narrow_message();
|
||||
}
|
||||
|
||||
if ((self === narrowed_msg_list) && !self.empty() &&
|
||||
(self.selected_id() === -1) && !opts.delay_render) {
|
||||
// And also select the newly arrived message.
|
||||
self.select_id(self.selected_id(), {then_scroll: true, use_closest: true});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user