Add push notification deep linking and sharing subscription checks
- Add deep link navigation from push notifications to specific task column on kanban board - Fix subscription check in push notification handler to allow navigation when limitations disabled - Add pendingNavigationTaskId to handle notifications when app isn't ready - Add ScrollViewReader to AllTasksView for programmatic scrolling to task column - Add canShareResidence() and canShareContractor() subscription checks (iOS & Android) - Add test APNS file for simulator push notification testing 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -4,6 +4,7 @@ struct MainTabView: View {
|
||||
@EnvironmentObject private var themeManager: ThemeManager
|
||||
@State private var selectedTab = 0
|
||||
@StateObject private var authManager = AuthenticationManager.shared
|
||||
@ObservedObject private var pushManager = PushNotificationManager.shared
|
||||
var refreshID: UUID
|
||||
|
||||
var body: some View {
|
||||
@@ -52,6 +53,13 @@ struct MainTabView: View {
|
||||
.onChange(of: authManager.isAuthenticated) { _ in
|
||||
selectedTab = 0
|
||||
}
|
||||
// Check for pending navigation when view appears (app launched from notification)
|
||||
.onAppear {
|
||||
if pushManager.pendingNavigationTaskId != nil {
|
||||
selectedTab = 1 // Switch to Tasks tab
|
||||
// Note: Don't clear here - AllTasksView will handle navigation and clear it
|
||||
}
|
||||
}
|
||||
// Handle push notification deep links - switch to appropriate tab
|
||||
// The actual task navigation is handled by AllTasksView
|
||||
.onReceive(NotificationCenter.default.publisher(for: .navigateToTask)) { _ in
|
||||
|
||||
Reference in New Issue
Block a user