This repository has been archived by the owner on Sep 11, 2024. It is now read-only.
Fix issue that caused the value of certain settings to be inverted #6896
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes element-hq/element-web#19201
When using the
SettingsStore.watchSetting()
method for settings which have aninvertedSettingName
, thenewValueAt
argument passed to the callback function, would erroneously contain the inverted value.This was making it so that such settings appeared to be disabled when they should in fact be enabled, or vice-versa. This was however only the case for code which took in account the
newValueAt
argument. Code using thenewValue
argument was not affected.The settings which have an
invertedSettingName
, and were thus potentially impacted are:This appears to be a regression introduced in #6261.
Here's what your changelog entry will look like:
🐛 Bug Fixes
Preview: https://615f03d07fd6f32726b13383--matrix-react-sdk.netlify.app
⚠️ Do you trust the author of this PR? Maybe this build will steal your keys or give you malware. Exercise caution. Use test accounts.