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

Remove by key multiplatform-settings-serialization #136

Closed
blyscuit opened this issue Dec 22, 2022 · 1 comment
Closed

Remove by key multiplatform-settings-serialization #136

blyscuit opened this issue Dec 22, 2022 · 1 comment

Comments

@blyscuit
Copy link

blyscuit commented Dec 22, 2022

multiplatform-settings-serialization saves value by combining the key parameter with the property name. and not possible to remove the values by sending key and value type.

Add support for, would be really appreciated.

settings.remove(
    serializer: KSerializer<T>,
    key: String
)

Currently I'm using this as a a workaround

    override fun remove(key: String) {
        settings
            .keys
            .filter { it.startsWith(key) }
            .map { settings.remove(it) }
    }
@russhwolf
Copy link
Owner

This is already being tracked in #81 and there's a draft implementation in #117

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

No branches or pull requests

2 participants