mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +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:
@@ -31,37 +31,24 @@ enum ClientProxyError: Error {
|
||||
case failedLoadingMedia
|
||||
}
|
||||
|
||||
enum PusherKind {
|
||||
case http
|
||||
case email
|
||||
|
||||
// var rustValue: MatrixRustSDK.PusherKind {
|
||||
// switch self {
|
||||
// case .http:
|
||||
// return .http
|
||||
// case .email:
|
||||
// return .email
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
enum PushFormat {
|
||||
case eventIdOnly
|
||||
|
||||
// var rustValue: MatrixRustSDK.PushFormat {
|
||||
// switch self {
|
||||
// case .eventIdOnly:
|
||||
// return .eventIdOnly
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
enum SlidingSyncConstants {
|
||||
static let initialTimelineLimit: UInt = 0
|
||||
static let lastMessageTimelineLimit: UInt = 1
|
||||
static let timelinePrecachingTimelineLimit: UInt = 20
|
||||
}
|
||||
|
||||
/// This struct represents the configuration that we are using to register the application through Pusher to Sygnal
|
||||
/// using the Matrix Rust SDK, more info here:
|
||||
/// https://github.com/matrix-org/sygnal
|
||||
struct PusherConfiguration {
|
||||
let identifiers: PusherIdentifiers
|
||||
let kind: PusherKind
|
||||
let appDisplayName: String
|
||||
let deviceDisplayName: String
|
||||
let profileTag: String?
|
||||
let lang: String
|
||||
}
|
||||
|
||||
protocol ClientProxyProtocol: AnyObject, MediaLoaderProtocol {
|
||||
var callbacks: PassthroughSubject<ClientProxyCallback, Never> { get }
|
||||
|
||||
@@ -97,15 +84,5 @@ protocol ClientProxyProtocol: AnyObject, MediaLoaderProtocol {
|
||||
|
||||
func logout() async
|
||||
|
||||
// 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
|
||||
func setPusher(with configuration: PusherConfiguration) async throws
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user