This repository was 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
Merged
Conversation
When using the SettingsStore.watchSetting() method for settings which have an invertedSettingName, the newValueAt 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 the newValue argument was not affected. The settings which have an invertedSettingName, and were thus potentially impacted are: - MessageComposerInput.dontSuggestEmoji - hideRedactions - hideJoinLeaves - hideAvatarChanges - hideDisplaynameChanges - hideReadReceipts - Pill.shouldHidePillAvatar - TextualBody.disableBigEmoji - dontSendTypingNotifications - TagPanel.disableTagPanel - webRtcForceTURN Signed-off-by: Paulo Pinto <paulo.pinto@automattic.com>
Palid
suggested changes
Oct 7, 2021
Contributor
Palid
left a comment
There was a problem hiding this comment.
Please address the pull request comments, otherwise LGTM.
Signed-off-by: Paulo Pinto <paulo.pinto@automattic.com>
Signed-off-by: Paulo Pinto <paulo.pinto@automattic.com>
Signed-off-by: Paulo Pinto <paulo.pinto@automattic.com>
Contributor
Author
|
Agree with the remarks @Palid, thanks! I believe I've address them all, let me know if there's anything else you'd like me to change. |
Palid
approved these changes
Oct 7, 2021
Contributor
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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, thenewValueAtargument 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
newValueAtargument. Code using thenewValueargument 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.