diff --git a/src/App/Views/Navigations/NavigationPathHost.swift b/src/App/Views/Navigations/NavigationPathHost.swift index e1e98b6..debff14 100644 --- a/src/App/Views/Navigations/NavigationPathHost.swift +++ b/src/App/Views/Navigations/NavigationPathHost.swift @@ -17,7 +17,7 @@ struct NavigationPathHost: View { var body: some View { content($path) .task { - path = await RouteHelper.load(from: pathString) + await loadPath() } .onDisappear { storePath() @@ -25,6 +25,15 @@ struct NavigationPathHost: View { .onReceive(NotificationCenter.default.publisher(for: .platformWillResignActiveNotification), perform: storePath(_:)) } + private func loadPath() async { + let path = await RouteHelper.load(from: pathString) + var transaction = Transaction() + transaction.disablesAnimations = true + withTransaction(transaction) { + self.path = path + } + } + private func storePath(_: Notification) { storePath() }