russhwolf / multiplatform-settings

A Kotlin Multiplatform library for saving simple key-value data
Apache License 2.0
1.6k stars 67 forks source link

Provide API for serialized value removal #148

Closed MJegorovas closed 1 year ago

MJegorovas commented 1 year ago

Would be nice to have an API that could be used to easily remove serialized value from settings. Current remove does not work, because settings keys are actually a combination of key and property name. Working around this at the moment with this:


for (settingsKey in settings.keys) {
    if (settingsKey.startsWith(key)) settings.remove(settingsKey)
}
russhwolf commented 1 year ago

Closing as a dupe of #81.