From f8b65c22a9cbf60a1d359c6aa2744baede1ee05f Mon Sep 17 00:00:00 2001 From: Rigel Kent Date: Tue, 14 Jan 2020 10:58:38 +0100 Subject: [PATCH] Fix OnInit for subscribe button Fixing regression introduced in a004ff172638083d69ed1028d18c9b6222d24da6 that initialized component for accounts with no channels before changing the input a second time. --- .../subscribe-button.component.html | 12 +++---- .../subscribe-button.component.ts | 33 ++++++++++--------- 2 files changed, 24 insertions(+), 21 deletions(-) diff --git a/client/src/app/shared/user-subscription/subscribe-button.component.html b/client/src/app/shared/user-subscription/subscribe-button.component.html index 7d33b0621..2a4df29f7 100644 --- a/client/src/app/shared/user-subscription/subscribe-button.component.html +++ b/client/src/app/shared/user-subscription/subscribe-button.component.html @@ -1,31 +1,31 @@
+ [ngClass]="{'subscribe-button': !isAllChannelsSubscribed, 'unsubscribe-button': isAllChannelsSubscribed, 'big': isBigButton }"> - + Subscribe Subscribe to all channels - {{ subscribeStatus(true).length }}/{{ subscribed.size }} + {{ subscribeStatus(true).length }}/{{ subscribed.size }} channels subscribed - + {{ videoChannels[0].followersCount | myNumberFormatter }} -