mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 10:33:45 +00:00
Add a Compound hook. (#3979)
* Rename AppHooksProtocol.configure() to .setUp(). * Add a CompoundHook.
This commit is contained in:
@@ -14,6 +14,11 @@ class AppHooks: AppHooksProtocol {
|
||||
appSettingsHook = hook
|
||||
}
|
||||
|
||||
private(set) var compoundHook: CompoundHookProtocol = DefaultCompoundHook()
|
||||
func registerCompoundHook(_ hook: CompoundHookProtocol) {
|
||||
compoundHook = hook
|
||||
}
|
||||
|
||||
private(set) var bugReportHook: BugReportHookProtocol = DefaultBugReportHook()
|
||||
func registerBugReportHook(_ hook: BugReportHookProtocol) {
|
||||
bugReportHook = hook
|
||||
@@ -32,9 +37,9 @@ class AppHooks: AppHooksProtocol {
|
||||
}
|
||||
|
||||
protocol AppHooksProtocol {
|
||||
func configure()
|
||||
func setUp()
|
||||
}
|
||||
|
||||
extension AppHooksProtocol {
|
||||
func configure() { }
|
||||
func setUp() { }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user