mirror of https://github.com/zulip/zulip.git
sidebar: Revert to narrowing to whole stream.
This reverts commit eb2bdb706
"sidebar: Narrow to latest topic if
not in stream." On a trial deploy, many users were surprised and
preferred the old behavior.
This commit is contained in:
parent
d15fcc18cc
commit
ac7d086085
|
@ -282,11 +282,6 @@ casper.then(function () {
|
|||
casper.click('#stream_filters [data-stream-name="Verona"] a');
|
||||
});
|
||||
|
||||
expect_stream_subject();
|
||||
|
||||
// Click again to now narrow to stream.
|
||||
casper.thenClick('#stream_filters [data-stream-name="Verona"] a');
|
||||
|
||||
expect_stream();
|
||||
|
||||
casper.then(check_narrow_title('Verona - Zulip Dev - Zulip'));
|
||||
|
|
|
@ -468,15 +468,7 @@ exports.initialize = function () {
|
|||
var stream_id = $(e.target).parents('li').attr('data-stream-id');
|
||||
var sub = stream_data.get_sub_by_id(stream_id);
|
||||
popovers.hide_all();
|
||||
var operators = [{operator: "stream", operand: sub.name}];
|
||||
// If we are not in the stream already, narrow to most recent topic in stream.
|
||||
if (!narrow_state.is_for_stream_id(stream_id)) {
|
||||
var history = topic_data.get_recent_names(stream_id);
|
||||
if (history.length > 0) {
|
||||
operators.push({operator: "topic", operand: history[0]});
|
||||
}
|
||||
}
|
||||
narrow.activate(operators, {select_first_unread: true, trigger: "sidebar"});
|
||||
narrow.by('stream', sub.name, {select_first_unread: true, trigger: 'sidebar'});
|
||||
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
|
Loading…
Reference in New Issue