mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 12:07:55 +00:00
Removing Delivered Notifications (#1305)
* completed * changelog * tests * more tests * better naming * fix * a bit more waiting time * generated mocks * xcodegen
This commit is contained in:
@@ -17,10 +17,14 @@
|
||||
import Foundation
|
||||
import UserNotifications
|
||||
|
||||
// Sadly we can't mock this because the delegate needs to be weak
|
||||
// Use UserNotificationCenterSpy
|
||||
protocol UserNotificationCenterProtocol: AnyObject {
|
||||
var delegate: UNUserNotificationCenterDelegate? { get set }
|
||||
func add(_ request: UNNotificationRequest) async throws
|
||||
func requestAuthorization(options: UNAuthorizationOptions) async throws -> Bool
|
||||
func deliveredNotifications() async -> [UNNotification]
|
||||
func removeDeliveredNotifications(withIdentifiers identifiers: [String])
|
||||
func setNotificationCategories(_ categories: Set<UNNotificationCategory>)
|
||||
func authorizationStatus() async -> UNAuthorizationStatus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user