mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
Updated setPusher function (#684)
* updated set_pusher function from the SDK * this fixes a crash and allows for the navigation to work by using the threadIdentifier of the notification * adding NCE target * project setup completed with xcodegen * no need for those ugly storyboards * code improvement * removing unused outlet * mocks generated with the comment instead of the marker protocol * updated stencil * fixed unit tests * updated swiftformat * pr comments
This commit is contained in:
@@ -89,40 +89,13 @@ class MockClientProxy: ClientProxyProtocol {
|
||||
// no-op
|
||||
}
|
||||
|
||||
var setPusherCalled = false
|
||||
var setPusherErrorToThrow: Error?
|
||||
var setPusherPushkey: String?
|
||||
var setPusherKind: PusherKind?
|
||||
var setPusherAppId: String?
|
||||
var setPusherAppDisplayName: String?
|
||||
var setPusherDeviceDisplayName: String?
|
||||
var setPusherProfileTag: String?
|
||||
var setPusherLang: String?
|
||||
var setPusherUrl: URL?
|
||||
var setPusherFormat: PushFormat?
|
||||
var setPusherDefaultPayload: [AnyHashable: Any]?
|
||||
// swiftlint:disable:next function_parameter_count
|
||||
func setPusher(pushkey: String,
|
||||
kind: PusherKind?,
|
||||
appId: String,
|
||||
appDisplayName: String,
|
||||
deviceDisplayName: String,
|
||||
profileTag: String?,
|
||||
lang: String,
|
||||
url: URL?,
|
||||
format: PushFormat?,
|
||||
defaultPayload: [AnyHashable: Any]?) async throws {
|
||||
var setPusherArgument: PusherConfiguration?
|
||||
var setPusherCalled = false
|
||||
|
||||
func setPusher(with configuration: PusherConfiguration) async throws {
|
||||
if let setPusherErrorToThrow { throw setPusherErrorToThrow }
|
||||
setPusherCalled = true
|
||||
setPusherPushkey = pushkey
|
||||
setPusherKind = kind
|
||||
setPusherAppId = appId
|
||||
setPusherAppDisplayName = appDisplayName
|
||||
setPusherDeviceDisplayName = deviceDisplayName
|
||||
setPusherProfileTag = profileTag
|
||||
setPusherLang = lang
|
||||
setPusherUrl = url
|
||||
setPusherFormat = format
|
||||
setPusherDefaultPayload = defaultPayload
|
||||
setPusherArgument = configuration
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user