zulip/zproject
Steve Howell 264dcb6f40 refactor: Extract MessageListData class.
Most of this was straightforward.

Most functions that were grabbed verbatim and whole from
the original class still have one-line wrappers.

Many functions are just-the-data versions of functions that
remain in MessageList:  see add, append, prepend, remove as
examples.  In a typical pattern the MessageList code becomes
super simple:

    prepend: function MessageList_prepend(messages) {
        var viewable_messages = this.data.prepend(messages);
        this.view.prepend(viewable_messages);
    },

Two large functions had some minor surgery:

    triage_messages =
            top half of add_messages +
            API to pass three lists back

    change_message_id =
            original version +
            two simple callbacks to list

For the function update_muting_and_rerender(), we continue
to early-exit if this.muting_enabled is false, and we copied
that same defensive check to the new function
named update_items_for_muting(), even though it's technically
hidden from that codepath by the caller.
2018-05-05 06:31:51 -07:00
..
jinja2 two_factor: Add templates for 2-factor-auth setup. 2018-05-02 15:20:49 -07:00
__init__.py Rename Django project to zproject. 2013-08-07 11:04:03 -04:00
backends.py test_auth_backends: Add a test for GitHub auth mobile_flow_otp. 2018-04-22 19:55:05 -07:00
dev_settings.py zilencer: Add automated signup system for push notifications. 2018-05-03 21:27:49 -07:00
dev_urls.py test_emails: Generate emails instead of hardcoding. 2017-09-26 15:02:47 -07:00
email_backends.py zproject: Use Python 3 syntax for typing. 2017-11-27 17:01:18 -08:00
legacy_urls.py urls: Move the json/fetch_api_key endpoint to be an API-style route. 2018-01-08 13:15:52 -05:00
prod_settings_template.py settings: Add a few more section headings. 2018-04-05 21:24:48 -07:00
settings.py refactor: Extract MessageListData class. 2018-05-05 06:31:51 -07:00
slack_importer_test_settings.py slack importer: Use standalone database for running tests. 2018-01-07 09:50:27 -05:00
terms.md.template Add TERMS_OF_SERVICE setting. 2016-07-29 20:47:31 -07:00
test_settings.py zilencer: Add automated signup system for push notifications. 2018-05-03 21:27:49 -07:00
urls.py public_archives: Add basic infra for displaying topics. 2018-05-02 15:23:33 -07:00
wsgi.py python: Add lint rule banning 'from os.path import'. 2017-09-22 04:55:38 -07:00