narrow: Remove unnecessary select_first_unread option.

We consistently either pass a `then_select_id` into narrow.activate,
or were using the select_first_unread option.  Now, we just compute
select_first_unread based on the value of then_select_id.
This commit is contained in:
Tim Abbott
2018-04-22 21:02:11 -07:00
parent 0c9b1dc9ff
commit e4c50ff4fd
14 changed files with 24 additions and 52 deletions

View File

@@ -226,8 +226,7 @@ exports.register_stream_handlers = function () {
$('body').on('click', '.narrow_to_stream', function (e) {
var sub = stream_popover_sub(e);
exports.hide_stream_popover();
narrow.by('stream', sub.name,
{select_first_unread: true, trigger: 'sidebar popover'}
narrow.by('stream', sub.name, {trigger: 'sidebar popover'}
);
e.stopPropagation();
});
@@ -335,8 +334,7 @@ exports.register_topic_handlers = function () {
{operator: 'stream', operand: sub.name},
{operator: 'topic', operand: topic},
];
var opts = {select_first_unread: true, trigger: 'sidebar'};
narrow.activate(operators, opts);
narrow.activate(operators, {trigger: 'sidebar'});
e.stopPropagation();
});