Update SDK to 1.0.102-alpha (#1408)

* Update SDK to 1.0.102-alpha

* Log error

* Notification Improvements API part 1 (#1410)

* changes

* WIP

* progress

* updated test

* removed unused

* code improvement

* Process diffs as batches provided by the SDK.

---------

Co-authored-by: Mauro <34335419+Velin92@users.noreply.github.com>
Co-authored-by: Doug <douglase@element.io>
This commit is contained in:
Alfonso Grillo
2023-07-27 11:48:56 +02:00
committed by GitHub
parent 188d41e59d
commit 1529b5b8ca
12 changed files with 117 additions and 160 deletions
@@ -378,17 +378,21 @@ class SDKClientMock: SDKClientProtocol {
}
//MARK: - `notificationClient`
public var notificationClientThrowableError: Error?
public var notificationClientCallsCount = 0
public var notificationClientCalled: Bool {
return notificationClientCallsCount > 0
}
public var notificationClientReturnValue: NotificationClientBuilder!
public var notificationClientClosure: (() -> NotificationClientBuilder)?
public var notificationClientClosure: (() throws -> NotificationClientBuilder)?
public func `notificationClient`() -> NotificationClientBuilder {
public func `notificationClient`() throws -> NotificationClientBuilder {
if let error = notificationClientThrowableError {
throw error
}
notificationClientCallsCount += 1
if let notificationClientClosure = notificationClientClosure {
return notificationClientClosure()
return try notificationClientClosure()
} else {
return notificationClientReturnValue
}