Просмотр исходного кода

Show Schedule add button only for logged-in premium users.

Gate the Schedule header plus button behind both Google sign-in and premium access so non-premium or signed-out users no longer see quick add.

Made-with: Cursor
huzaifahayat12 3 месяцев назад
Родитель
Сommit
e174210f41
1 измененных файлов с 4 добавлено и 2 удалено
  1. 4 2
      meetings_app/ViewController.swift

+ 4 - 2
meetings_app/ViewController.swift

@@ -3305,8 +3305,10 @@ private extension ViewController {
         titleRowSpacer.setContentCompressionResistancePriority(.defaultLow, for: .horizontal)
 
         titleRow.addArrangedSubview(titleLabel)
-        titleRow.addArrangedSubview(makeSchedulePageAddButton())
-        titleRow.setCustomSpacing(12, after: titleLabel)
+        if googleOAuth.loadTokens() != nil && storeKitCoordinator.hasPremiumAccess {
+            titleRow.addArrangedSubview(makeSchedulePageAddButton())
+            titleRow.setCustomSpacing(12, after: titleLabel)
+        }
         titleRow.addArrangedSubview(titleRowSpacer)
         container.addArrangedSubview(titleRow)