Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix setSettings not updating _settings in RNCallkeepModule due to singleton #582

Merged
merged 1 commit into from
Jun 30, 2022

Conversation

manuquentin
Copy link
Contributor

In RNCallkeepModule.setSettings we called:

// ...
_settings = getSettings(null);

But in getSettings we're only updating _settings if its null:

public static WritableMap getSettings(@Nullable Context context) {
    if (_settings == null) {
        fetchStoredSettings(context);
    }

    return _settings;
}

So _settings is never updated we calling setSettings and will have the value of the first read in fetchStoredSettings.

@manuquentin manuquentin merged commit cd36ba0 into master Jun 30, 2022
@manuquentin manuquentin deleted the fix_store_settings branch June 30, 2022 14:02
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