mirror of https://github.com/zulip/zulip.git
stream_edit: Remove unnacessary conditionals.
The condition was removed because in either case we want to have the stream_row and not the sub/unsub button, so we can always get the stream_row directly.
This commit is contained in:
parent
8f32db81a1
commit
25c5856988
|
@ -636,12 +636,8 @@ exports.initialize = function () {
|
||||||
// checkmark in the subscriber list.
|
// checkmark in the subscriber list.
|
||||||
$("#subscriptions_table").on("click", ".sub_unsub_button", function (e) {
|
$("#subscriptions_table").on("click", ".sub_unsub_button", function (e) {
|
||||||
const sub = get_sub_for_target(e.target);
|
const sub = get_sub_for_target(e.target);
|
||||||
let stream_row;
|
// Makes sure we take the correct stream_row.
|
||||||
if ($(e.currentTarget).is(":button")) {
|
const stream_row = $("#subscriptions_table div.stream-row[data-stream-id='" + sub.stream_id + "']");
|
||||||
stream_row = $("#subscriptions_table div.stream-row[data-stream-id='" + sub.stream_id + "']");
|
|
||||||
} else {
|
|
||||||
stream_row = $(e.currentTarget).parent();
|
|
||||||
}
|
|
||||||
subs.sub_or_unsub(sub, stream_row);
|
subs.sub_or_unsub(sub, stream_row);
|
||||||
|
|
||||||
if (!sub.subscribed) {
|
if (!sub.subscribed) {
|
||||||
|
|
Loading…
Reference in New Issue