| ... | @@ -46,6 +46,7 @@ import { useSavedRemoteConnections } from "../../state/use-remote-environment-re | ... | @@ -46,6 +46,7 @@ import { useSavedRemoteConnections } from "../../state/use-remote-environment-re |
| 46 | import { SettingsRow } from "./components/SettingsRow"; | 46 | import { SettingsRow } from "./components/SettingsRow"; |
| 47 | import { SettingsSection } from "./components/SettingsSection"; | 47 | import { SettingsSection } from "./components/SettingsSection"; |
| 48 | import { SettingsSwitchRow } from "./components/SettingsSwitchRow"; | 48 | import { SettingsSwitchRow } from "./components/SettingsSwitchRow"; |
| | 49 | import { resolveAgentAwarenessPlatformPresentation } from "./SettingsRouteScreen.logic"; |
| 49 | | 50 | |
| 50 | type NotificationStatus = "checking" | "enabled" | "disabled" | "unsupported"; | 51 | type NotificationStatus = "checking" | "enabled" | "disabled" | "unsupported"; |
| 51 | type LiveActivityStatus = "checking" | "enabled" | "disabled" | "signed-out" | "linking"; | 52 | type LiveActivityStatus = "checking" | "enabled" | "disabled" | "signed-out" | "linking"; |
| ... | @@ -144,6 +145,7 @@ function ConfiguredSettingsRouteScreen() { | ... | @@ -144,6 +145,7 @@ function ConfiguredSettingsRouteScreen() { |
| 144 | const preferencesResult = useAtomValue(mobilePreferencesAtom); | 145 | const preferencesResult = useAtomValue(mobilePreferencesAtom); |
| 145 | const savePreferences = useAtomSet(updateMobilePreferencesAtom); | 146 | const savePreferences = useAtomSet(updateMobilePreferencesAtom); |
| 146 | const agentAwarenessPushAvailable = supportsAgentAwarenessPush(); | 147 | const agentAwarenessPushAvailable = supportsAgentAwarenessPush(); |
| | 148 | const agentAwarenessPlatform = resolveAgentAwarenessPlatformPresentation(Platform.OS); |
| 147 | const insets = useSafeAreaInsets(); | 149 | const insets = useSafeAreaInsets(); |
| 148 | const navigation = useNavigation(); | 150 | const navigation = useNavigation(); |
| 149 | const { getToken, isLoaded, isSignedIn } = useAuth({ treatPendingAsSignedOut: false }); | 151 | const { getToken, isLoaded, isSignedIn } = useAuth({ treatPendingAsSignedOut: false }); |
| ... | @@ -473,10 +475,12 @@ function ConfiguredSettingsRouteScreen() { | ... | @@ -473,10 +475,12 @@ function ConfiguredSettingsRouteScreen() { |
| 473 | icon="bell.badge" | 475 | icon="bell.badge" |
| 474 | label="Device Notifications" | 476 | label="Device Notifications" |
| 475 | disabled={ | 477 | disabled={ |
| | 478 | !agentAwarenessPlatform.supported || |
| 476 | !agentAwarenessPushAvailable || | 479 | !agentAwarenessPushAvailable || |
| 477 | notificationStatus === "checking" || | 480 | notificationStatus === "checking" || |
| 478 | notificationStatus === "unsupported" | 481 | notificationStatus === "unsupported" |
| 479 | } | 482 | } |
| | 483 | subtitle={agentAwarenessPlatform.subtitle} |
| 480 | // Only reads as on when this device is actually registered with the | 484 | // Only reads as on when this device is actually registered with the |
| 481 | // relay; otherwise notifications cannot be delivered regardless of | 485 | // relay; otherwise notifications cannot be delivered regardless of |
| 482 | // the local iOS permission. | 486 | // the local iOS permission. |
| ... | @@ -487,6 +491,7 @@ function ConfiguredSettingsRouteScreen() { | ... | @@ -487,6 +491,7 @@ function ConfiguredSettingsRouteScreen() { |
| 487 | /> | 491 | /> |
| 488 | <SettingsSwitchRow | 492 | <SettingsSwitchRow |
| 489 | disabled={ | 493 | disabled={ |
| | 494 | !agentAwarenessPlatform.supported || |
| 490 | !agentAwarenessPushAvailable || | 495 | !agentAwarenessPushAvailable || |
| 491 | !isLoaded || | 496 | !isLoaded || |
| 492 | liveActivityStatus === "checking" || | 497 | liveActivityStatus === "checking" || |
| ... | @@ -494,6 +499,7 @@ function ConfiguredSettingsRouteScreen() { | ... | @@ -494,6 +499,7 @@ function ConfiguredSettingsRouteScreen() { |
| 494 | } | 499 | } |
| 495 | icon="bolt.circle" | 500 | icon="bolt.circle" |
| 496 | label="Live Activity Updates" | 501 | label="Live Activity Updates" |
| | 502 | subtitle={agentAwarenessPlatform.subtitle} |
| 497 | // Same gate: a saved preference is meaningless until the device | 503 | // Same gate: a saved preference is meaningless until the device |
| 498 | // registration the relay needs to push updates has succeeded. | 504 | // registration the relay needs to push updates has succeeded. |
| 499 | value={ | 505 | value={ |