mirror of https://github.com/zulip/zulip.git
f024a7ab14
This is a prefactoring to eventually eliminate the home_unread_messages global variable. More commits to follow. In order to set up process_loaded_for_unread() not to modify global variable to get its job done, we want to pull it out of add_messages(), so that add_messages() doesn't have to pass back state to the 9 different places in the codebase where it's called. There are only 2 places where process_loaded_for_unread() get called after this commit. In order to facilitate pulling up process_loaded_for_unread(), I made it so that the contract for add_messages() was to accept already-hydrated messages. This way I could hydrate the messages before calling process_loaded_for_unread() without have to worry about double-caching them in add_messages. This will slightly improve performance, but it was mostly done for code clarity. (imported from commit ad5aaad5b1f22c31647370f4c9dcb5f89d7d99a7) |
||
---|---|---|
.. | ||
check-all.js | ||
jslint.js |