Commit Graph

10 Commits

Author SHA1 Message Date
Steve Howell 1821005dfe Restore subject counts for Uppercase streams
(imported from commit ef0e78d39c56da67544441a73ea257f215fefd94)
2013-08-26 11:21:29 -04:00
Steve Howell 09241ae2de Use Dict more in unread.js.
The setdefault() and num_items() methods are handy, and it was a
little tough to keep track of which objects were Dicts vs. {}.

(imported from commit 6ca81ac411943c59bef6d6bae39c7641feb5574b)
2013-08-26 11:21:29 -04:00
Steve Howell 58c141ad79 Avoid side effects in ui.set_presence_list().
Have ui.set_presence_list() only touch the presence list.

Before this change, it was calling update_unread_counts(), which
has a bunch of side effects unrelated to the presence list.

(imported from commit 690f754d78874a03fa36f8ff8765d5a63e431d28)
2013-08-22 14:46:13 -04:00
Jessica McKellar 485de6a5bc Correctly compute home unread counts on page load.
We had a duplicate and incorrect check on if a stream was in your home
view, which caused us to not display Home unread counts in the sidebar
/ notification bar / Dock on page load.

(imported from commit db27cf9091f8b47200b025f03a26c4fe82701882)
2013-08-20 11:10:18 -04:00
Steve Howell 29c012dc74 Create stream_data.js module.
This pulls a lot of data-centric functions out of subs.js.

(imported from commit 0deed7d4bf5697e893af9bc9d888c2d5da8d9fa2)
2013-08-19 12:17:55 -04:00
Steve Howell babbca7360 Use d.each() for iterating Dict instances.
(imported from commit 8cfe2c9a61aa1179454a6ab986fa23d04de09525)
2013-08-15 10:16:12 -04:00
Zev Benjamin ec9322fc87 Use Dict everywhere we have keys based on potentially dangerous, user-supplied data
There are also one or two places we don't need to use it for security
purposes, but we do so for consistencey.

(imported from commit aa111f5a22a0e8597ec3cf8504adae66d5fb6768)
2013-08-09 17:35:14 -04:00
Steve Howell 46c4a6a9b3 Add unit test coverage to unread.js.
This covers most of the module's functionality, with special
emphasis on lines that use underscore.js (_.each and _.filter).

(imported from commit 074181a0273286a258504be634bdd1cead2eecd5)
2013-07-29 13:47:57 -04:00
Steve Howell 3d8ce28964 Use underscore in unread.js
(imported from commit 91befaaaff5d9a791a3c1bb4ff99f4085c27c4cb)
2013-07-29 13:47:57 -04:00
Tim Abbott 3bba0cc927 Move zephyr/static to just static.
It's not really a part of the server (aka the rest of zephyr/).

(imported from commit 27f6b6b064938ad927075a68d873e4b68710d279)
2013-07-29 12:11:26 -04:00