[stable32] Fix reenabling system address book#59956
Open
[stable32] Fix reenabling system address book#59956
Conversation
This makes the code more consistent with stable33 and later. Signed-off-by: Daniel Calviño Sánchez <[email protected]>
This makes the code more consistent with stable33 and later. Signed-off-by: Daniel Calviño Sánchez <[email protected]>
When "system_addressbook_exposed" is set through the administration settings it is set as a boolean value in IAppConfig which, in the end, stores it as "0" or "1". However, when read from IConfig in UserAddressBooks it was strictly compared against "yes", so even if explicitly enabled the comparison always failed and the system address book was always seen as disabled. To solve that now the comparison is made against a boolean value in IAppConfig, which is also consistent with other places where the value is got (like ContactsManager). Signed-off-by: Daniel Calviño Sánchez <[email protected]>
85ae19d to
b26329e
Compare
hamza221
approved these changes
Apr 28, 2026
SebastianKrupinski
approved these changes
Apr 28, 2026
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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 #57329
When
system_addressbook_exposedis set through the administration settings it is set as a boolean value inIAppConfigwhich, in the end, stores it as0or1. However, when read fromIConfiginUserAddressBooksit was strictly compared against"yes", so even if explicitly enabled the comparison always failed and the system address book was always seen as disabled. To solve that now the comparison is made against a boolean value inIAppConfig, which is also consistent with other places where the value is got.Note that the problem does not happen in stable33 and later because in those versions
getValueBoolis used being already sincesystem_addressbook_exposedwas registered in the lexiconDue to that besides the fix itself a couple of minor refactorings were added to make the code more similar to stable33 for consistency.
How to reproduce
Result with this pull request
The system address book is available
Result without this pull request
The system address book is not available