mirror of
https://github.com/zulip/zulip.git
synced 2025-11-10 17:07:07 +00:00
Restore the time-travel functionality with Waseem's UI.
This restores the time-travel functionality and fixes Waseem's laundry list of problems with its original UI. (imported from commit e30e02c25af994435adb815d26284b3669c945a4)
This commit is contained in:
@@ -638,11 +638,15 @@ function get_updates(options) {
|
||||
});
|
||||
}
|
||||
|
||||
function load_old_messages(anchor, num_before, num_after, cont, because_button) {
|
||||
function load_old_messages(anchor, num_before, num_after, cont, because_button,
|
||||
cont_will_add_messages) {
|
||||
var narrow_str;
|
||||
if (because_button === undefined) {
|
||||
because_button = false;
|
||||
}
|
||||
if (cont_will_add_messages === undefined) {
|
||||
cont_will_add_messages = false;
|
||||
}
|
||||
if (because_button && narrow.active()) {
|
||||
narrow_str = JSON.stringify(narrow.data());
|
||||
} else {
|
||||
@@ -667,7 +671,7 @@ function load_old_messages(anchor, num_before, num_after, cont, because_button)
|
||||
|
||||
$('#connection-error').hide();
|
||||
|
||||
if (data.messages.length !== 0) {
|
||||
if (data.messages.length !== 0 && !cont_will_add_messages) {
|
||||
var add_to_home = !narrow.active() || !because_button;
|
||||
add_messages(data.messages, add_to_home);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user