mirror of
https://github.com/zulip/zulip.git
synced 2025-11-21 15:09:34 +00:00
Add messages at bottom when message list is empty.
(imported from commit d15ff7ddb39e30ca08dd9d0eccf3dae75414a3ef)
This commit is contained in:
@@ -591,10 +591,10 @@ function add_messages_helper(messages, msg_list, predicate, messages_are_new) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Put messages in correct order on either side of the message list
|
// Put messages in correct order on either side of the message list
|
||||||
if (msg_list.empty() || (msg.id < msg_list.first().id)) {
|
if (msg_list.empty() || msg.id > msg_list.last().id) {
|
||||||
top_messages.push(msg);
|
|
||||||
} else if (msg.id > msg_list.last().id) {
|
|
||||||
bottom_messages.push(msg);
|
bottom_messages.push(msg);
|
||||||
|
} else if (msg.id < msg_list.first().id) {
|
||||||
|
top_messages.push(msg);
|
||||||
} else {
|
} else {
|
||||||
interior_messages.push(msg);
|
interior_messages.push(msg);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user