zulip/static
Abhijeet Prasad Bodas fc53d2c66a topic muting: Clean up live update code.
Previously, we used to do a kind of "local echo"
whenever the user muted/unmuted a topic. Meaning,
we used to do most of the UI update work before making
the API call to mute the topic, instead of after
receiving the `muted_topics` event. This behavior
has been so since the beginning of time
(b4b6fa14d3) and isn't ideal because:
1. If the request fails on the backend, the UI
could end up in an incorrect state.
2. Adds code complexity.
3. Makes it difficult to catch bugs related to
live-update (like the one fixed by
f725711ff2).
4. Isn't consistent with other parts of the
codebase, which do the UI update while handling
events.

This commit makes it so that all the UI update
work is done only after recieving the `muted_topics`
event.

The only possible issue with this strategy could
be users sending another duplicate request in the small
time span before receiving the event. But that isn't
a big problem, because all requests involved here are
idempotent, and the worst that can happen is a HTTP 400.
2021-04-27 17:53:06 -07:00
..
assets eslint: Forbid CommonJS variables in ES6 modules. 2021-03-23 01:42:43 -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 docs for GitHub Actions integration. 2021-04-15 16:42:31 -07:00
js topic muting: Clean up live update code. 2021-04-27 17:53:06 -07:00
shared shared: Bump version to 0.0.5. 2021-04-20 17:19:12 +08:00
styles settings: Capitalize notification sound names with CSS. 2021-04-27 16:43:28 -07:00
templates notifications: Add support for `None` option in `Notification sound`. 2021-04-27 16:42:16 -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