Add some front-end debugging changes

(imported from commit 21684b09100bc0a24372948a9417c973709c1be2)
This commit is contained in:
Zev Benjamin
2013-10-30 13:38:16 -04:00
parent 2e6b3131b5
commit eb7fd1ba51
2 changed files with 10 additions and 0 deletions

View File

@@ -173,6 +173,10 @@ MessageList.prototype = {
{table_name: this.table_name, id: id}); {table_name: this.table_name, id: id});
} }
if (closest_id === -1) {
blueslip.fatal("Cannot select id -1", {table_name: this.table_name});
}
id = closest_id; id = closest_id;
opts.id = id; opts.id = id;
this._selected_id = id; this._selected_id = id;

View File

@@ -101,6 +101,11 @@ exports.activate = function (operators, opts) {
return exports.deactivate(); return exports.deactivate();
} }
var filter = new Filter(operators); var filter = new Filter(operators);
blueslip.debug("Narrowed", {operators: _.map(filter.operators(),
function (e) { return e[0]; }),
previous_id: current_msg_list.selected_id(),
previous_is_summarized: current_msg_list.is_summarized_message(
current_msg_list.get(current_msg_list.selected_id()))});
var had_message_content = compose.has_message_content(); var had_message_content = compose.has_message_content();
@@ -313,6 +318,7 @@ exports.deactivate = function () {
if (current_filter === undefined) { if (current_filter === undefined) {
return; return;
} }
blueslip.debug("Unnarrowed");
if (ui.actively_scrolling()) { if (ui.actively_scrolling()) {
// There is no way to intercept in-flight scroll events, and they will // There is no way to intercept in-flight scroll events, and they will