[FIX] Issues introduced by changes to the AltSource specification.

This commit is contained in:
Fabian Thies
2023-01-13 13:37:38 +01:00
parent b9b309e603
commit b5dea18073
3 changed files with 19 additions and 13 deletions

View File

@@ -64,11 +64,13 @@ class NotificationManager: ObservableObject {
self.showNotification(title: text, detailText: detailText)
}
func showNotification(title: String, detailText: String?) {
let notificationId = UUID()
self.notifications[notificationId] = Notification(id: notificationId, title: title, message: detailText)
DispatchQueue.main.async {
self.notifications[notificationId] = Notification(id: notificationId, title: title, message: detailText)
}
let dismissWorkItem = DispatchWorkItem {
self.notifications.removeValue(forKey: notificationId)