mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-11-18 14:31:01 +00:00
Correctly route notification at app launch
This commit is contained in:
parent
1f14311c2c
commit
05815e6d35
2 changed files with 2 additions and 1 deletions
|
@ -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 a new issue