|
@@ -270,6 +270,7 @@ final class ViewController: NSViewController {
|
|
|
private var hasPresentedLaunchPaywall = false
|
|
private var hasPresentedLaunchPaywall = false
|
|
|
private var hasViewAppearedOnce = false
|
|
private var hasViewAppearedOnce = false
|
|
|
private var lastKnownPremiumAccess = false
|
|
private var lastKnownPremiumAccess = false
|
|
|
|
|
+ private var displayedScheduleMeetings: [ScheduledMeeting] = []
|
|
|
|
|
|
|
|
private enum ScheduleFilter: Int {
|
|
private enum ScheduleFilter: Int {
|
|
|
case all = 0
|
|
case all = 0
|
|
@@ -962,11 +963,22 @@ private extension ViewController {
|
|
|
let hadPremiumAccess = lastKnownPremiumAccess
|
|
let hadPremiumAccess = lastKnownPremiumAccess
|
|
|
lastKnownPremiumAccess = hasPremiumAccess
|
|
lastKnownPremiumAccess = hasPremiumAccess
|
|
|
refreshPaywallStoreUI()
|
|
refreshPaywallStoreUI()
|
|
|
|
|
+ refreshScheduleCardsForPremiumStateChange()
|
|
|
|
|
+ if !hadPremiumAccess && hasPremiumAccess {
|
|
|
|
|
+ Task { [weak self] in
|
|
|
|
|
+ await self?.loadSchedule()
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
if hadPremiumAccess && !hasPremiumAccess {
|
|
if hadPremiumAccess && !hasPremiumAccess {
|
|
|
showPaywall()
|
|
showPaywall()
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ private func refreshScheduleCardsForPremiumStateChange() {
|
|
|
|
|
+ guard let stack = scheduleCardsStack else { return }
|
|
|
|
|
+ renderScheduleCards(into: stack, meetings: displayedScheduleMeetings)
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
private func refreshSidebarPremiumButton() {
|
|
private func refreshSidebarPremiumButton() {
|
|
|
let isPremium = storeKitCoordinator.hasPremiumAccess
|
|
let isPremium = storeKitCoordinator.hasPremiumAccess
|
|
|
if isPremium {
|
|
if isPremium {
|
|
@@ -3710,6 +3722,7 @@ private extension ViewController {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
private func renderScheduleCards(into stack: NSStackView, meetings: [ScheduledMeeting]) {
|
|
private func renderScheduleCards(into stack: NSStackView, meetings: [ScheduledMeeting]) {
|
|
|
|
|
+ displayedScheduleMeetings = meetings
|
|
|
let shouldShowScrollControls = meetings.count > 3
|
|
let shouldShowScrollControls = meetings.count > 3
|
|
|
scheduleScrollLeftButton?.isHidden = !shouldShowScrollControls
|
|
scheduleScrollLeftButton?.isHidden = !shouldShowScrollControls
|
|
|
scheduleScrollRightButton?.isHidden = !shouldShowScrollControls
|
|
scheduleScrollRightButton?.isHidden = !shouldShowScrollControls
|