Updated on 2026-08-14

This commit is contained in:
Tangem 2022-07-04 21:14:26 +03:00
parent bb7a530086
commit 80c67e4d99
10 changed files with 104 additions and 63 deletions

View file

@ -0,0 +1,14 @@
package com.tangem.tap.common.compose.extensions
import androidx.compose.runtime.MutableState
/**
[REDACTED_AUTHOR]
*/
fun <T> MutableState<List<T>>.addAndNotify(value: T) {
this.value = this.value.toMutableList().apply { add(value) }
}
fun <T> MutableState<List<T>>.removeAndNotify(value: T) {
this.value = this.value.toMutableList().apply { remove(value) }
}