mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 20:39:24 +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:
@@ -16,6 +16,7 @@ class UserSession: UserSessionProtocol {
|
||||
|
||||
let clientProxy: ClientProxyProtocol
|
||||
let userSettings: UserSettings
|
||||
let userHooks: UserHooks
|
||||
|
||||
let mediaProvider: MediaProviderProtocol
|
||||
let voiceMessageMediaManager: VoiceMessageMediaManagerProtocol
|
||||
@@ -32,11 +33,13 @@ class UserSession: UserSessionProtocol {
|
||||
|
||||
init(clientProxy: ClientProxyProtocol,
|
||||
userSettings: UserSettings,
|
||||
userHooks: UserHooks,
|
||||
mediaProvider: MediaProviderProtocol,
|
||||
voiceMessageMediaManager: VoiceMessageMediaManagerProtocol,
|
||||
liveLocationManager: LiveLocationManagerProtocol) {
|
||||
self.clientProxy = clientProxy
|
||||
self.userSettings = userSettings
|
||||
self.userHooks = userHooks
|
||||
|
||||
self.mediaProvider = mediaProvider
|
||||
self.voiceMessageMediaManager = voiceMessageMediaManager
|
||||
|
||||
@@ -22,6 +22,7 @@ struct SessionSecurityState: Equatable {
|
||||
protocol UserSessionProtocol: Sendable {
|
||||
var clientProxy: ClientProxyProtocol { get }
|
||||
var userSettings: UserSettings { get }
|
||||
var userHooks: UserHooks { get }
|
||||
|
||||
var mediaProvider: MediaProviderProtocol { get }
|
||||
var voiceMessageMediaManager: VoiceMessageMediaManagerProtocol { get }
|
||||
|
||||
@@ -126,6 +126,7 @@ class UserSessionStore: UserSessionStoreProtocol {
|
||||
|
||||
return UserSession(clientProxy: clientProxy,
|
||||
userSettings: userSettings,
|
||||
userHooks: appHooks.userSessionHook.makeUserHooks(for: clientProxy),
|
||||
mediaProvider: mediaProvider,
|
||||
voiceMessageMediaManager: voiceMessageMediaManager,
|
||||
liveLocationManager: liveLocationManager)
|
||||
|
||||
Reference in New Issue
Block a user