|
|
@@ -270,6 +270,7 @@ final class ViewController: NSViewController {
|
|
270
|
270
|
private var hasPresentedLaunchPaywall = false
|
|
271
|
271
|
private var hasViewAppearedOnce = false
|
|
272
|
272
|
private var lastKnownPremiumAccess = false
|
|
|
273
|
+ private var displayedScheduleMeetings: [ScheduledMeeting] = []
|
|
273
|
274
|
|
|
274
|
275
|
private enum ScheduleFilter: Int {
|
|
275
|
276
|
case all = 0
|
|
|
@@ -962,11 +963,22 @@ private extension ViewController {
|
|
962
|
963
|
let hadPremiumAccess = lastKnownPremiumAccess
|
|
963
|
964
|
lastKnownPremiumAccess = hasPremiumAccess
|
|
964
|
965
|
refreshPaywallStoreUI()
|
|
|
966
|
+ refreshScheduleCardsForPremiumStateChange()
|
|
|
967
|
+ if !hadPremiumAccess && hasPremiumAccess {
|
|
|
968
|
+ Task { [weak self] in
|
|
|
969
|
+ await self?.loadSchedule()
|
|
|
970
|
+ }
|
|
|
971
|
+ }
|
|
965
|
972
|
if hadPremiumAccess && !hasPremiumAccess {
|
|
966
|
973
|
showPaywall()
|
|
967
|
974
|
}
|
|
968
|
975
|
}
|
|
969
|
976
|
|
|
|
977
|
+ private func refreshScheduleCardsForPremiumStateChange() {
|
|
|
978
|
+ guard let stack = scheduleCardsStack else { return }
|
|
|
979
|
+ renderScheduleCards(into: stack, meetings: displayedScheduleMeetings)
|
|
|
980
|
+ }
|
|
|
981
|
+
|
|
970
|
982
|
private func refreshSidebarPremiumButton() {
|
|
971
|
983
|
let isPremium = storeKitCoordinator.hasPremiumAccess
|
|
972
|
984
|
if isPremium {
|
|
|
@@ -3710,6 +3722,7 @@ private extension ViewController {
|
|
3710
|
3722
|
}
|
|
3711
|
3723
|
|
|
3712
|
3724
|
private func renderScheduleCards(into stack: NSStackView, meetings: [ScheduledMeeting]) {
|
|
|
3725
|
+ displayedScheduleMeetings = meetings
|
|
3713
|
3726
|
let shouldShowScrollControls = meetings.count > 3
|
|
3714
|
3727
|
scheduleScrollLeftButton?.isHidden = !shouldShowScrollControls
|
|
3715
|
3728
|
scheduleScrollRightButton?.isHidden = !shouldShowScrollControls
|