minor: Re-order code blocks.

This is setting up for a subsequent commit to have a smaller
diff.  The current ordering of the code blocks doesn't matter,
since only one of the conditions will be true, so this won't
change any behavior.  (Later commits will make the order matter.)
This commit is contained in:
Steve Howell
2018-05-08 18:36:47 +00:00
committed by showell
parent 19ac0b23ab
commit 9b15c2cd46

View File

@@ -203,14 +203,6 @@ exports.get_unread_ids = function () {
var topic_name; var topic_name;
var pm_string; var pm_string;
if (current_filter.is_exactly('stream')) {
stream_id = exports.stream_id();
if (stream_id === undefined) {
return [];
}
return unread.get_msg_ids_for_stream(stream_id);
}
if (current_filter.is_exactly('stream', 'topic')) { if (current_filter.is_exactly('stream', 'topic')) {
stream_id = exports.stream_id(); stream_id = exports.stream_id();
if (stream_id === undefined) { if (stream_id === undefined) {
@@ -220,6 +212,14 @@ exports.get_unread_ids = function () {
return unread.get_msg_ids_for_topic(stream_id, topic_name); return unread.get_msg_ids_for_topic(stream_id, topic_name);
} }
if (current_filter.is_exactly('stream')) {
stream_id = exports.stream_id();
if (stream_id === undefined) {
return [];
}
return unread.get_msg_ids_for_stream(stream_id);
}
if (current_filter.is_exactly('pm-with')) { if (current_filter.is_exactly('pm-with')) {
pm_string = exports.pm_string(); pm_string = exports.pm_string();
if (pm_string === undefined) { if (pm_string === undefined) {