zulip/static
Abhijeet Prasad Bodas 7f9c3bb4d0 starred messages: Fix "unstar all in topic" is incomplete.
Currently, when there are some old starred messages
in a topic, it is possible that some of them won't be
unstarred on doing "Unstar all messages in topic".
This happens when those messages haven't been fetched
yet from the server, and we have no way to verify if
they actually belong to the topic.

This commit fixes that by changing this mechanism to
first fetch all starred messages in the topic from
the server, and then send their IDs back to the backend
to unstar them.

While doing this, we assume that the user does not
have more than 1000 starred messages in that topic.

Note that, we still depend on the local data to
decide whether or not the "Unstar all messages in
topic" option should be shown in the topic popover.
A method similar to the above cannot be used here, because
making server requests before opening the popover
could visually slow down the popover opening.

Using local data for the topic popover would probably
not be a big problem, because users would want to
unstar all messages in a topic probably after noticing
that there are a lot of them, meaning there was at least
one starred message from that topic which was already
fetched, which is sufficient for us to conclude that
we need to show the option in the topic popover.

Fixes #17790
2021-04-29 16:43:39 -07:00
..
assets zulip-icon: Add `zulip-icon` as classPrefix for icon. 2021-04-29 09:02:25 -07:00
audio notificaiton_sounds: Add some atonal sounds created by @stwime. 2021-02-05 12:28:20 -08:00
generated
html templates: Mark all void tags as self-closing. 2021-04-21 09:49:34 -07:00
images integrations: Add JSON Printer webhook integration. 2021-04-28 07:23:18 -07:00
js starred messages: Fix "unstar all in topic" is incomplete. 2021-04-29 16:43:39 -07:00
shared shared: Bump version to 0.0.5. 2021-04-20 17:19:12 +08:00
styles compose_control_buttons: Change class name for GIF icon. 2021-04-29 16:06:51 -07:00
templates starred messages: Clean up "unstar all in topic" warning. 2021-04-29 16:43:39 -07:00
third Revert "markdown: Add support to shorten GitHub links." 2021-04-02 15:52:34 -07:00
.gitignore dependencies: Replace moment.js with date-fns. 2021-02-05 11:04:32 -08:00