Correctly route notification at app launch
This commit is contained in:
parent
1f14311c2c
commit
05815e6d35
|
@ -239,6 +239,7 @@ class AppDelegate: NSObject, UIApplicationDelegate {
|
|||
didFinishLaunchingWithOptions _: [UIApplication.LaunchOptionsKey: Any]? = nil) -> Bool
|
||||
{
|
||||
try? AVAudioSession.sharedInstance().setCategory(.ambient, options: .mixWithOthers)
|
||||
PushNotificationsService.shared.setAccounts(accounts: AppAccountsManager.shared.pushAccounts)
|
||||
return true
|
||||
}
|
||||
|
||||
|
|
|
@ -56,7 +56,7 @@ struct NotificationsTab: View {
|
|||
}
|
||||
.onChange(of: pushNotificationsService.handleNotification) { notification in
|
||||
if let notification, let type = notification.supportedType {
|
||||
DispatchQueue.main.async {
|
||||
DispatchQueue.main.asyncAfter(deadline: .now() + 0.2) {
|
||||
switch type {
|
||||
case .follow, .follow_request:
|
||||
routerPath.navigate(to: .accountDetailWithAccount(account: notification.account))
|
||||
|
|
Loading…
Reference in New Issue