Remove dead code related to unread_in_current_view.

This commit is contained in:
Steve Howell
2017-08-02 15:54:18 -04:00
committed by Tim Abbott
parent 325d7f0f57
commit c32b9a5d19
2 changed files with 0 additions and 44 deletions

View File

@@ -48,7 +48,6 @@ var zero_counts = {
stream_count: new Dict(),
topic_count: new Dict(),
pm_count: new Dict(),
unread_in_current_view: 0,
};
(function test_empty_counts_while_narrowed() {
@@ -419,31 +418,6 @@ stream_data.get_stream_id = function () {
assert.deepEqual(counts, zero_counts);
}());
(function test_num_unread_current_messages() {
var count = unread.num_unread_current_messages();
assert.equal(count, 0);
var message = {
id: 15,
};
current_msg_list.all_messages = function () {
return [message];
};
// It's a little suspicious that num_unread_current_messages()
// is using the pointer as a hint for filtering out unread
// messages, but right now, it's impossible for unread messages
// to be above the pointer in a narrowed view, so unread.js uses
// this for optimization purposes.
current_msg_list.selected_id = function () {
return 11; // less than our message's id
};
count = unread.num_unread_current_messages();
assert.equal(count, 1);
}());
(function test_message_unread() {
// Test some code that might be overly defensive, for line coverage sake.
assert(!unread.message_unread(undefined));