mirror of
https://github.com/zulip/zulip.git
synced 2026-07-12 21:04:41 +08:00
Zulip 服务器和 Web 应用程序。开源团队聊天可帮助团队保持高效和专注。
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) |
||
|---|---|---|
| api | ||
| assets | ||
| bots | ||
| certs | ||
| confirmation | ||
| humbug | ||
| node_modules | ||
| servers | ||
| templates | ||
| tools | ||
| zephyr | ||
| .gitignore | ||
| manage.py | ||