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:
palashb01 2023-07-29 06:11:30 +05:30 committed by Tim Abbott
parent 485d307b64
commit eee7d18d03
1 changed files with 0 additions and 7 deletions

View File

@ -318,13 +318,6 @@ export function register_click_handlers() {
function removal_success(data) { function removal_success(data) {
if (data.removed.length > 0) { 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( ui_report.success(
$t_html({defaultMessage: "Unsubscribed successfully!"}), $t_html({defaultMessage: "Unsubscribed successfully!"}),
$alert_box, $alert_box,