mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Notification Handler to handle notifications in foreground (#837)
* changed how the notifications are handled * local notifications can be decrypted and shown! * Improved the handling for the mock and for the normal messages * Avatar images are also displayed * pr ready, commented some code that is not supposed to be releaaed yet, adjusted some tests and added some source code in the targets * fixing some swiftlint complaints and removed an unused function * better swiftlint disable * addressing PR comments
This commit is contained in:
@@ -264,21 +264,21 @@ class NotificationManagerMock: NotificationManagerProtocol {
|
||||
showLocalNotificationWithSubtitleReceivedInvocations.append((title: title, subtitle: subtitle))
|
||||
await showLocalNotificationWithSubtitleClosure?(title, subtitle)
|
||||
}
|
||||
//MARK: - setClientProxy
|
||||
//MARK: - setUserSession
|
||||
|
||||
var setClientProxyCallsCount = 0
|
||||
var setClientProxyCalled: Bool {
|
||||
return setClientProxyCallsCount > 0
|
||||
var setUserSessionCallsCount = 0
|
||||
var setUserSessionCalled: Bool {
|
||||
return setUserSessionCallsCount > 0
|
||||
}
|
||||
var setClientProxyReceivedClientProxy: ClientProxyProtocol?
|
||||
var setClientProxyReceivedInvocations: [ClientProxyProtocol?] = []
|
||||
var setClientProxyClosure: ((ClientProxyProtocol?) -> Void)?
|
||||
var setUserSessionReceivedUserSession: UserSessionProtocol?
|
||||
var setUserSessionReceivedInvocations: [UserSessionProtocol?] = []
|
||||
var setUserSessionClosure: ((UserSessionProtocol?) -> Void)?
|
||||
|
||||
func setClientProxy(_ clientProxy: ClientProxyProtocol?) {
|
||||
setClientProxyCallsCount += 1
|
||||
setClientProxyReceivedClientProxy = clientProxy
|
||||
setClientProxyReceivedInvocations.append(clientProxy)
|
||||
setClientProxyClosure?(clientProxy)
|
||||
func setUserSession(_ userSession: UserSessionProtocol?) {
|
||||
setUserSessionCallsCount += 1
|
||||
setUserSessionReceivedUserSession = userSession
|
||||
setUserSessionReceivedInvocations.append(userSession)
|
||||
setUserSessionClosure?(userSession)
|
||||
}
|
||||
//MARK: - requestAuthorization
|
||||
|
||||
|
||||
Reference in New Issue
Block a user