diff --git a/vector/src/debug/java/im/vector/app/features/debug/features/DebugVectorOverrides.kt b/vector/src/debug/java/im/vector/app/features/debug/features/DebugVectorOverrides.kt index b2206b81c9..5e16182f3c 100644 --- a/vector/src/debug/java/im/vector/app/features/debug/features/DebugVectorOverrides.kt +++ b/vector/src/debug/java/im/vector/app/features/debug/features/DebugVectorOverrides.kt @@ -63,7 +63,7 @@ class DebugVectorOverrides(private val context: Context) : VectorOverrides { } } - suspend fun updateHomeserverCapabilities(block: HomeserverCapabilitiesOverride.() -> HomeserverCapabilitiesOverride) { + suspend fun setHomeserverCapabilities(block: HomeserverCapabilitiesOverride.() -> HomeserverCapabilitiesOverride) { val capabilitiesOverride = block(forceHomeserverCapabilities.firstOrNull() ?: HomeserverCapabilitiesOverride(null, null)) context.dataStore.edit { settings -> when (capabilitiesOverride.canChangeDisplayName) { diff --git a/vector/src/debug/java/im/vector/app/features/debug/settings/DebugPrivateSettingsViewModel.kt b/vector/src/debug/java/im/vector/app/features/debug/settings/DebugPrivateSettingsViewModel.kt index d570ff2997..62871023bc 100644 --- a/vector/src/debug/java/im/vector/app/features/debug/settings/DebugPrivateSettingsViewModel.kt +++ b/vector/src/debug/java/im/vector/app/features/debug/settings/DebugPrivateSettingsViewModel.kt @@ -89,14 +89,14 @@ class DebugPrivateSettingsViewModel @AssistedInject constructor( private fun handSetDisplayNameCapabilityOverride(action: SetDisplayNameCapabilityOverride) { viewModelScope.launch { val forceDisplayName = action.option.toBoolean() - debugVectorOverrides.updateHomeserverCapabilities { copy(canChangeDisplayName = forceDisplayName) } + debugVectorOverrides.setHomeserverCapabilities { copy(canChangeDisplayName = forceDisplayName) } } } private fun handSetAvatarCapabilityOverride(action: SetAvatarCapabilityOverride) { viewModelScope.launch { val forceAvatar = action.option.toBoolean() - debugVectorOverrides.updateHomeserverCapabilities { copy(canChangeAvatar = forceAvatar) } + debugVectorOverrides.setHomeserverCapabilities { copy(canChangeAvatar = forceAvatar) } } } }