mirror of https://github.com/zulip/zulip.git
Rename reset_load_more_status to reset_for_new_narrow.
We are about to make this logic a little more specific to what happens when you make a new narrow.
This commit is contained in:
parent
ae84908eca
commit
389421d9c2
|
@ -17,7 +17,7 @@ var consts = {
|
||||||
// not load_more_messages().
|
// not load_more_messages().
|
||||||
var load_more_enabled = true;
|
var load_more_enabled = true;
|
||||||
|
|
||||||
exports.reset_load_more_status = function reset_load_more_status() {
|
exports.reset_for_new_narrow = function () {
|
||||||
load_more_enabled = true;
|
load_more_enabled = true;
|
||||||
message_scroll.hide_loading_more_messages_indicator();
|
message_scroll.hide_loading_more_messages_indicator();
|
||||||
};
|
};
|
||||||
|
|
|
@ -220,7 +220,7 @@ exports.activate = function (raw_operators, opts) {
|
||||||
msg_list: message_list.narrowed,
|
msg_list: message_list.narrowed,
|
||||||
use_first_unread_anchor: opts.use_initial_narrow_pointer,
|
use_first_unread_anchor: opts.use_initial_narrow_pointer,
|
||||||
cont: function () {
|
cont: function () {
|
||||||
message_fetch.reset_load_more_status();
|
message_fetch.reset_for_new_narrow();
|
||||||
if (defer_selecting_closest) {
|
if (defer_selecting_closest) {
|
||||||
maybe_select_closest();
|
maybe_select_closest();
|
||||||
}
|
}
|
||||||
|
@ -231,7 +231,7 @@ exports.activate = function (raw_operators, opts) {
|
||||||
});
|
});
|
||||||
|
|
||||||
if (! defer_selecting_closest) {
|
if (! defer_selecting_closest) {
|
||||||
message_fetch.reset_load_more_status();
|
message_fetch.reset_for_new_narrow();
|
||||||
maybe_select_closest();
|
maybe_select_closest();
|
||||||
} else {
|
} else {
|
||||||
message_scroll.show_loading_more_messages_indicator();
|
message_scroll.show_loading_more_messages_indicator();
|
||||||
|
@ -465,7 +465,7 @@ exports.deactivate = function () {
|
||||||
condense.condense_and_collapse($("#zhome tr.message_row"));
|
condense.condense_and_collapse($("#zhome tr.message_row"));
|
||||||
|
|
||||||
$('#search_query').val('');
|
$('#search_query').val('');
|
||||||
message_fetch.reset_load_more_status();
|
message_fetch.reset_for_new_narrow();
|
||||||
hashchange.save_narrow();
|
hashchange.save_narrow();
|
||||||
|
|
||||||
if (current_msg_list.selected_id() !== -1) {
|
if (current_msg_list.selected_id() !== -1) {
|
||||||
|
|
Loading…
Reference in New Issue