mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-19 16:13:42 +02:00
Move logic to a separate method
This commit is contained in:
@@ -29,7 +29,7 @@ final class SetPinCoordinator: SetPinCoordinatorType {
|
||||
private let session: MXSession?
|
||||
var viewMode: SetPinCoordinatorViewMode {
|
||||
didSet {
|
||||
start()
|
||||
updateRootCoordinator()
|
||||
}
|
||||
}
|
||||
private let pinCodePreferences: PinCodePreferences
|
||||
@@ -70,9 +70,7 @@ final class SetPinCoordinator: SetPinCoordinatorType {
|
||||
// MARK: - Public methods
|
||||
|
||||
func start() {
|
||||
let rootCoordinator = getRootCoordinator()
|
||||
|
||||
setRootCoordinator(rootCoordinator)
|
||||
updateRootCoordinator()
|
||||
}
|
||||
|
||||
func toPresentable() -> UIViewController {
|
||||
@@ -85,6 +83,12 @@ final class SetPinCoordinator: SetPinCoordinatorType {
|
||||
|
||||
// MARK: - Private methods
|
||||
|
||||
private func updateRootCoordinator() {
|
||||
let rootCoordinator = getRootCoordinator()
|
||||
|
||||
setRootCoordinator(rootCoordinator)
|
||||
}
|
||||
|
||||
private func setRootCoordinator(_ coordinator: Coordinator & Presentable) {
|
||||
coordinator.start()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user