From 57b0b6982c2ddfb8e33dfab88da84196667ff5b8 Mon Sep 17 00:00:00 2001 From: Thomas Ricouard Date: Sun, 8 Jan 2023 10:57:58 +0100 Subject: [PATCH] Fix keychain group --- .../App/Tabs/Settings/PushNotificationsView.swift | 11 ++++++++--- Packages/Env/Sources/Env/PushNotifications.swift | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/IceCubesApp/App/Tabs/Settings/PushNotificationsView.swift b/IceCubesApp/App/Tabs/Settings/PushNotificationsView.swift index ea8f95fd..c4cdcea6 100644 --- a/IceCubesApp/App/Tabs/Settings/PushNotificationsView.swift +++ b/IceCubesApp/App/Tabs/Settings/PushNotificationsView.swift @@ -19,7 +19,11 @@ struct PushNotificationsView: View { Toggle(isOn: $pushNotifications.isPushEnabled) { Text("Push notification") } - Group { + } + .listRowBackground(theme.primaryBackgroundColor) + + if pushNotifications.isPushEnabled { + Section { Toggle(isOn: $pushNotifications.isFollowNotificationEnabled) { Text("Follow notification") } @@ -35,9 +39,10 @@ struct PushNotificationsView: View { Toggle(isOn: $pushNotifications.isPollNotificationEnabled) { Text("Polls notification") } - }.disabled(!pushNotifications.isPushEnabled) + } + .listRowBackground(theme.primaryBackgroundColor) + .transition(.move(edge: .bottom)) } - .listRowBackground(theme.primaryBackgroundColor) } .navigationTitle("Push Notifications") .scrollContentBackground(.hidden) diff --git a/Packages/Env/Sources/Env/PushNotifications.swift b/Packages/Env/Sources/Env/PushNotifications.swift index 1d168658..ce9af371 100644 --- a/Packages/Env/Sources/Env/PushNotifications.swift +++ b/Packages/Env/Sources/Env/PushNotifications.swift @@ -10,7 +10,7 @@ import Network public class PushNotifications: ObservableObject { enum Constants { static let endpoint = "https://icecubesrelay.fly.dev" - static let keychainGroup = "Z6P74P6T99.com.thomasricouard.IceCubesApp" + static let keychainGroup = "346J38YKE3.com.thomasricouard.IceCubesApp" static let keychainAuthKey = "notifications_auth_key" static let keychainPrivateKey = "notifications_private_key" }