mirror of https://github.com/zulip/zulip.git
user_profile: update the streams list row dynamically.
Previously, there was no mechanism in place to replace the data. Therefore, we had to manually delete the stream row when unsubscribing. However, with the introduction of this new function, there is no need for manual deletion. The server events code path already handles the case when any stream is unsubscribed, so we can simply remove this code.
This commit is contained in:
parent
485d307b64
commit
eee7d18d03
|
@ -318,13 +318,6 @@ export function register_click_handlers() {
|
|||
|
||||
function removal_success(data) {
|
||||
if (data.removed.length > 0) {
|
||||
// Most of the work for handling the unsubscribe is done
|
||||
// by the subscription -> remove event we will get.
|
||||
// However, the user profile component has not yet
|
||||
// implemented live update, so we do update its
|
||||
// UI manually here by removing the stream from this list.
|
||||
$stream_row.remove();
|
||||
|
||||
ui_report.success(
|
||||
$t_html({defaultMessage: "Unsubscribed successfully!"}),
|
||||
$alert_box,
|
||||
|
|
Loading…
Reference in New Issue