Skip to content

Commit 1109135

Browse files
committed
add removeValue
1 parent 733b9a7 commit 1109135

File tree

1 file changed

+4
-0
lines changed
  • analytics-kotlin-live/src/main/java/com/segment/analytics/liveplugins/kotlin

1 file changed

+4
-0
lines changed

analytics-kotlin-live/src/main/java/com/segment/analytics/liveplugins/kotlin/JSStorage.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,10 @@ class JSStorage {
7474
}
7575
}
7676

77+
fun removeValue(key: String) {
78+
this.sharedPreferences?.edit(commit = true) { remove(key) }
79+
}
80+
7781
private inline fun <reified T> save(key: String, value: T, type: String) {
7882
val jsonObject = buildJsonObject {
7983
put(PROP_TYPE, type)

0 commit comments

Comments
 (0)