mirror of https://github.com/zulip/zulip.git
81b493ba0b
There are now 2 cases for narrowing: 1. We narrowed, but only backwards in time (ie no unread were read). In this case, try to go back to exactly where we were before narrowing. This behavior is unchanged. 2. We read some unread messages in a narrow. Instead of going back to where we were before the narrow, go to our first unread message (or the bottom of the feed, if there are no unread messages). This is new. This means that after catching up through the sidebar, on returning home you'll be at the bottom of your feed. Searching for the first unread message in a message list with 40,000 messages only takes 17ms according to: function timeit() { var t0 = new Date().getTime(); _.find(current_msg_list.all(), unread.message_unread); var t1 = new Date().getTime(); console.log('Find first unread: ' + (t1 - t0) + ' ms'); } (imported from commit 87c467578a2cced0aa976d8ae2924371b85d2445) |
||
---|---|---|
.. | ||
check-all.js | ||
jslint.js |