mirror of
https://github.com/zulip/zulip.git
synced 2026-07-09 21:21:47 +08:00
Currently, `is_common_narrow` relies on `calc_can_mark_messages_read` to check a number of filters that are "common narrows" (which means they have a special message header title and different behavior when exiting a search view). Creates a helper function, `single_term_type_returns_all_messages_of_conversation`, that is used in both the above functions. The check for an empty array of term types is unnecessary for `is_common_narrow` because the "All messages" view has an undefined filter and the "in-home" term type used in the "zhome" message list is covered. So that empty array check is not moved to the helper function, and instead stays only in `calc_can_mark_messages_read`. The helper function checks for a single term type (except in the case of topic, which is checked in combination with stream) that will return all the messages of a conversation. To ensure consistency in the function, split the combined if condition of in-home and in-all, further improved the comments, and deleted the unnecessary ones. |
||
|---|---|---|
| .. | ||
| e2e-tests | ||
| generated | ||
| html | ||
| images | ||
| shared | ||
| src | ||
| styles | ||
| templates | ||
| tests | ||
| third | ||
| .browserslistrc | ||
| .gitignore | ||
| babel.config.js | ||
| debug-require-webpack-plugin.ts | ||
| debug-require.js | ||
| postcss.config.js | ||
| webpack.assets.json | ||
| webpack.config.ts | ||
| webpack.dev-assets.json | ||