mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 01:20:12 +00:00
Add the same unsaved changes alerts that Android has. (#4803)
* Add an alert to Discard or Save when there are unsaved changes on the RoomDetailsEditScreen. * Add an alert to Discard or Save when there are unsaved changes on the UserDetailsEditScreen. * Add an alert to Discard or Save when there are unsaved changes on the SecurityAndPrivacyScreen. * Update strings.
This commit is contained in:
@@ -1355,6 +1355,8 @@ class RoomFlowCoordinator: FlowCoordinatorProtocol {
|
||||
switch action {
|
||||
case .displayEditAddressScreen:
|
||||
presentEditAddressScreen()
|
||||
case .dismiss:
|
||||
navigationStackCoordinator.pop()
|
||||
}
|
||||
}
|
||||
.store(in: &cancellables)
|
||||
|
||||
@@ -155,6 +155,14 @@ class SettingsFlowCoordinator: FlowCoordinatorProtocol {
|
||||
navigationStackCoordinator: navigationStackCoordinator,
|
||||
userIndicatorController: flowParameters.userIndicatorController,
|
||||
appSettings: flowParameters.appSettings))
|
||||
coordinator.actions
|
||||
.sink { [weak self] action in
|
||||
switch action {
|
||||
case .dismiss:
|
||||
self?.navigationStackCoordinator.pop()
|
||||
}
|
||||
}
|
||||
.store(in: &cancellables)
|
||||
|
||||
navigationStackCoordinator.push(coordinator)
|
||||
}
|
||||
|
||||
@@ -256,6 +256,8 @@ final class SpaceSettingsFlowCoordinator: FlowCoordinatorProtocol {
|
||||
switch action {
|
||||
case .displayEditAddressScreen:
|
||||
self.stateMachine.tryEvent(.presentEditAddress)
|
||||
case .dismiss:
|
||||
navigationStackCoordinator.pop()
|
||||
}
|
||||
}
|
||||
.store(in: &cancellables)
|
||||
|
||||
Reference in New Issue
Block a user