mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-06 20:38:41 +00:00
Remove unused removeDeliveredInviteNotifications NotificationManager method
This commit is contained in:
committed by
Stefan Ceriu
parent
aaed6db0ea
commit
c33a164354
@@ -12026,41 +12026,6 @@ class NotificationManagerMock: NotificationManagerProtocol, @unchecked Sendable
|
|||||||
}
|
}
|
||||||
await removeDeliveredMessageNotificationsForClosure?(roomID)
|
await removeDeliveredMessageNotificationsForClosure?(roomID)
|
||||||
}
|
}
|
||||||
//MARK: - removeDeliveredInviteNotifications
|
|
||||||
|
|
||||||
var removeDeliveredInviteNotificationsUnderlyingCallsCount = 0
|
|
||||||
var removeDeliveredInviteNotificationsCallsCount: Int {
|
|
||||||
get {
|
|
||||||
if Thread.isMainThread {
|
|
||||||
return removeDeliveredInviteNotificationsUnderlyingCallsCount
|
|
||||||
} else {
|
|
||||||
var returnValue: Int? = nil
|
|
||||||
DispatchQueue.main.sync {
|
|
||||||
returnValue = removeDeliveredInviteNotificationsUnderlyingCallsCount
|
|
||||||
}
|
|
||||||
|
|
||||||
return returnValue!
|
|
||||||
}
|
|
||||||
}
|
|
||||||
set {
|
|
||||||
if Thread.isMainThread {
|
|
||||||
removeDeliveredInviteNotificationsUnderlyingCallsCount = newValue
|
|
||||||
} else {
|
|
||||||
DispatchQueue.main.sync {
|
|
||||||
removeDeliveredInviteNotificationsUnderlyingCallsCount = newValue
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
var removeDeliveredInviteNotificationsCalled: Bool {
|
|
||||||
return removeDeliveredInviteNotificationsCallsCount > 0
|
|
||||||
}
|
|
||||||
var removeDeliveredInviteNotificationsClosure: (() async -> Void)?
|
|
||||||
|
|
||||||
func removeDeliveredInviteNotifications() async {
|
|
||||||
removeDeliveredInviteNotificationsCallsCount += 1
|
|
||||||
await removeDeliveredInviteNotificationsClosure?()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
class NotificationSettingsProxyMock: NotificationSettingsProxyProtocol, @unchecked Sendable {
|
class NotificationSettingsProxyMock: NotificationSettingsProxyProtocol, @unchecked Sendable {
|
||||||
var callbacks: PassthroughSubject<NotificationSettingsProxyCallback, Never> {
|
var callbacks: PassthroughSubject<NotificationSettingsProxyCallback, Never> {
|
||||||
|
|||||||
@@ -129,14 +129,6 @@ final class NotificationManager: NSObject, NotificationManagerProtocol {
|
|||||||
notificationCenter.removeDeliveredNotifications(withIdentifiers: notificationsIdentifiers)
|
notificationCenter.removeDeliveredNotifications(withIdentifiers: notificationsIdentifiers)
|
||||||
}
|
}
|
||||||
|
|
||||||
func removeDeliveredInviteNotifications() async {
|
|
||||||
let notificationsIdentifiers = await notificationCenter
|
|
||||||
.deliveredNotifications()
|
|
||||||
.filter { $0.request.content.categoryIdentifier == NotificationConstants.Category.invite }
|
|
||||||
.map(\.request.identifier)
|
|
||||||
notificationCenter.removeDeliveredNotifications(withIdentifiers: notificationsIdentifiers)
|
|
||||||
}
|
|
||||||
|
|
||||||
private func setPusher(with deviceToken: Data, clientProxy: ClientProxyProtocol) async -> Bool {
|
private func setPusher(with deviceToken: Data, clientProxy: ClientProxyProtocol) async -> Bool {
|
||||||
do {
|
do {
|
||||||
let defaultPayload = APNSPayload(aps: APSInfo(mutableContent: 1,
|
let defaultPayload = APNSPayload(aps: APSInfo(mutableContent: 1,
|
||||||
|
|||||||
@@ -33,5 +33,4 @@ protocol NotificationManagerProtocol: AnyObject {
|
|||||||
func requestAuthorization()
|
func requestAuthorization()
|
||||||
|
|
||||||
func removeDeliveredMessageNotifications(for roomID: String) async
|
func removeDeliveredMessageNotifications(for roomID: String) async
|
||||||
func removeDeliveredInviteNotifications() async
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user