mirror of https://github.com/zulip/zulip.git
Only cycle through stream elements when cycling through streams
(imported from commit 244d72e88e18cc49f32ecfada791f032140390f2)
This commit is contained in:
parent
ba0d3605ae
commit
de9d26126a
|
@ -78,21 +78,21 @@ exports.cycle_stream = function (direction) {
|
|||
switch (direction) {
|
||||
case 'forward':
|
||||
if (narrow.stream() === undefined) {
|
||||
nextStream = $("#stream_filters").children().first();
|
||||
nextStream = $("#stream_filters").children('.narrow-filter').first();
|
||||
} else {
|
||||
nextStream = currentStream.next();
|
||||
nextStream = currentStream.next('.narrow-filter');
|
||||
if (nextStream.length === 0) {
|
||||
nextStream = $("#stream_filters").children().first();
|
||||
nextStream = $("#stream_filters").children('.narrow-filter').first();
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'backward':
|
||||
if (narrow.stream() === undefined) {
|
||||
nextStream = $("#stream_filters").children().last();
|
||||
nextStream = $("#stream_filters").children('.narrow-filter').last();
|
||||
} else {
|
||||
nextStream = currentStream.prev();
|
||||
nextStream = currentStream.prev('.narrow-filter');
|
||||
if (nextStream.length === 0) {
|
||||
nextStream = $("#stream_filters").children().last();
|
||||
nextStream = $("#stream_filters").children('.narrow-filter').last();
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue