mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Add the setting to change live location permissions to the change permissions screen.
This commit is contained in:
+5
-1
@@ -114,7 +114,11 @@ extension RoomChangePermissionsScreenViewState {
|
||||
RoomPermissionsSetting(title: L10n.screenRoomChangePermissionsDeleteMessages,
|
||||
value: currentPermissions.redact,
|
||||
ownPowerLevel: ownPowerLevel,
|
||||
keyPath: \.redact)
|
||||
keyPath: \.redact),
|
||||
RoomPermissionsSetting(title: L10n.screenRoomChangePermissionsLiveLocation,
|
||||
value: currentPermissions.liveLocation,
|
||||
ownPowerLevel: ownPowerLevel,
|
||||
keyPath: \.liveLocation)
|
||||
]
|
||||
}
|
||||
case .manageSpace:
|
||||
|
||||
+3
-1
@@ -67,7 +67,9 @@ class RoomChangePermissionsScreenViewModel: RoomChangePermissionsScreenViewModel
|
||||
.flatMap { $0 }
|
||||
.filter { state.currentPermissions[keyPath: $0.keyPath] != $0.value }
|
||||
for setting in changedSettings {
|
||||
changes[keyPath: setting.rustKeyPath] = setting.value
|
||||
for keyPath in setting.rustKeyPaths {
|
||||
changes[keyPath: keyPath] = setting.value
|
||||
}
|
||||
}
|
||||
|
||||
switch await roomProxy.applyPowerLevelChanges(changes) {
|
||||
|
||||
Reference in New Issue
Block a user