Skip to content

Fix: Return null for missing StringSet keys in SharedPreferences#126

Merged
pandulapeter merged 1 commit intopandulapeter:masterfrom
TregubArtem:bugfix/string-set-return-empty-instead-null
Aug 15, 2025
Merged

Fix: Return null for missing StringSet keys in SharedPreferences#126
pandulapeter merged 1 commit intopandulapeter:masterfrom
TregubArtem:bugfix/string-set-return-empty-instead-null

Conversation

@TregubArtem
Copy link
Copy Markdown
Contributor

Problem

The StringSet::getFinal method returns an empty set (using orEmpty) when a key was not found in SharedPreferences.

Solution

To align with the expected behavior of returning null when there is no stored value for the key.
This prevents the empty set from incorrectly being treated as the initial value, e.g. when we use MultipleSelectionListModule with isValuePersisted = true.

Video

Screen.Recording.2025-04-16.at.11.59.10.mov

@pandulapeter pandulapeter merged commit 207051e into pandulapeter:master Aug 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants