Skip to content
This repository has been archived by the owner on Jun 20, 2023. It is now read-only.

Commit

Permalink
Merge pull request #4443 from corona-warn-app/fix/12663-app-in-dead-m…
Browse files Browse the repository at this point in the history
…ode-after-tap-on-notification-on-lock-screen

Fix/12663 app in dead mode after tap on notification on lock screen
  • Loading branch information
30mar authored Apr 8, 2022
2 parents 989dd1f + 62c701d commit 9353af8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ final class NotificationManager: NSObject, UNUserNotificationCenterDelegate {

func userNotificationCenter(_: UNUserNotificationCenter, didReceive response: UNNotificationResponse, withCompletionHandler completionHandler: @escaping () -> Void) {
switch response.notification.request.identifier {

case ActionableNotificationIdentifier.riskDetection.identifier,
ActionableNotificationIdentifier.deviceTimeCheck.identifier:
ActionableNotificationIdentifier.deviceTimeCheck.identifier,
DeadmanNotificationManager.deadmanNotificationIdentifier:
showHome()

case ActionableNotificationIdentifier.pcrWarnOthersReminder1.identifier,
Expand Down
7 changes: 7 additions & 0 deletions src/xcode/ENA/ENA/Source/Scenes/Home/HomeCoordinator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,15 @@ class HomeCoordinator: RequiresAppDependencies {
.healthCertificateFromNotification,
.healthCertifiedPersonFromNotification,
.none:
/*
.healthCertifiedPersonFromNotification .checkIn and
.healthCertificateFromNotification routings are checked in the
showHome function in the RootCoordinator inside the defer block.
So basically here we show home THEN excute the routings in the defer
*/
rootViewController.dismiss(animated: false)
rootViewController.popToRootViewController(animated: false)
rootViewController.tabBarController?.selectedIndex = 0
homeController?.scrollToTop(animated: false)
return
}
Expand Down

0 comments on commit 9353af8

Please sign in to comment.