implemented the presentation of transfer ownership screen from the space flow and update UI and preview tests

This commit is contained in:
Mauro Romito
2026-01-27 19:40:30 +01:00
committed by Mauro
parent 9de49bad9e
commit 9999cd24b8
34 changed files with 127 additions and 60 deletions
@@ -185,11 +185,15 @@ class RoomChangeRolesScreenViewModel: RoomChangeRolesScreenViewModelType, RoomCh
}
private func confirmDiscardChanges() {
state.bindings.alertInfo = AlertInfo(id: .discardChanges,
title: L10n.screenRoomChangeRoleUnsavedChangesTitle,
message: L10n.screenRoomChangeRoleUnsavedChangesDescription,
primaryButton: .init(title: L10n.actionSave) { Task { await self.save() } },
secondaryButton: .init(title: L10n.actionDiscard, role: .cancel) { self.actionsSubject.send(.complete) })
if state.hasChanges {
state.bindings.alertInfo = AlertInfo(id: .discardChanges,
title: L10n.screenRoomChangeRoleUnsavedChangesTitle,
message: L10n.screenRoomChangeRoleUnsavedChangesDescription,
primaryButton: .init(title: L10n.actionSave) { Task { await self.save() } },
secondaryButton: .init(title: L10n.actionDiscard, role: .cancel) { self.actionsSubject.send(.complete) })
} else {
actionsSubject.send(.complete)
}
}
// MARK: Loading indicator