Extract topic_zoom.js.

This small modules nicely breaks down the
responsibilities of topic_list and stream_list
when it comes to zooming in and out of topics
(also known as hitting "more topics" or "All
Streams).

Before this, neither module was clearly in
charge, and there were kind of complicated
callback mechanisms.  The stream_list code
was asking topic_list to create click handlers
that called back into stream_list.

Now we just topic_zoom set up its own click
handlers and delegate out to the other two
modules.
This commit is contained in:
Steve Howell
2018-09-10 12:52:58 +00:00
committed by Tim Abbott
parent fe6df1c222
commit acb7149386
8 changed files with 74 additions and 89 deletions

View File

@@ -321,6 +321,8 @@ $(function () {
compose_fade.initialize();
pm_list.initialize();
stream_list.initialize();
topic_list.initialize();
topic_zoom.initialize();
drafts.initialize();
sent_messages.initialize();
hotspots.initialize();