wtg / Shuttle-Tracker-SwiftUI

Rensselaer campus shuttle tracker
https://shuttletracker.app
Mozilla Public License 2.0
9 stars 2 forks source link

Avoid showing announcements sheet when launching from non-announcement notification #162

Closed Gerzer closed 9 months ago

Gerzer commented 9 months ago

Currently, we assume that whenever the user taps on a notification to open the Shuttle Tracker app, the notification must’ve been for an announcement and try to extract the announcement payload from the notification’s userInfo dictionary. When the assumption is correct, the result is that we present an AnnouncementDetailView sheet for that specific announcement. However, we also have other types of notifications, such as those for Automatic Board Bus. With those notifications, since the launch handler fails to extract an announcement payload, the app presents top-level announcements list instead. This is a bug; we should change the behavior to show no sheets at all when announcement-payload extraction fails.