mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
Add a new UserHooks container and move some AppHooks. (#6332)
* Add a UserHooks system with just the CreateRoomScreenHook for now. * Move more hooks into UserHooks. * Pass the ClientProxy to makeUserHooks instead of calling AppHooks.configure(with:). * Update the Enterprise submodule.
This commit is contained in:
@@ -15175,6 +15175,11 @@ nonisolated class UserSessionMock: UserSessionProtocol, @unchecked Sendable {
|
||||
set(value) { underlyingUserSettings = value }
|
||||
}
|
||||
nonisolated(unsafe) var underlyingUserSettings: UserSettings!
|
||||
var userHooks: UserHooks {
|
||||
get { return underlyingUserHooks }
|
||||
set(value) { underlyingUserHooks = value }
|
||||
}
|
||||
nonisolated(unsafe) var underlyingUserHooks: UserHooks!
|
||||
var mediaProvider: MediaProviderProtocol {
|
||||
get { return underlyingMediaProvider }
|
||||
set(value) { underlyingMediaProvider = value }
|
||||
|
||||
@@ -12,6 +12,7 @@ import Foundation
|
||||
struct UserSessionMockConfiguration {
|
||||
var clientProxy: ClientProxyProtocol = ClientProxyMock(.init())
|
||||
var userSettings: UserSettings = .mock()
|
||||
var userHooks = UserHooks()
|
||||
var contentScannerService: ContentScannerServiceProtocol?
|
||||
var liveLocationManager: LiveLocationManagerProtocol = LiveLocationManagerMock(.init())
|
||||
}
|
||||
@@ -22,6 +23,7 @@ struct UserSessionMockConfiguration {
|
||||
|
||||
clientProxy = configuration.clientProxy
|
||||
userSettings = configuration.userSettings
|
||||
userHooks = configuration.userHooks
|
||||
callbacks = .init()
|
||||
|
||||
mediaProvider = MediaProviderMock(.init())
|
||||
|
||||
Reference in New Issue
Block a user