@Suppress("ProduceStateDoesNotAssignValue") until we figure out what's wrong with this lint.

This commit is contained in:
Vitor Pamplona
2024-09-26 11:36:52 -04:00
parent 35aeeb571c
commit 824cb4e5f1
13 changed files with 19 additions and 5 deletions
@@ -30,6 +30,7 @@ fun <K, V> produceCachedStateAsync(
cache: AsyncCachedState<K, V>,
key: K,
): State<V?> =
@Suppress("ProduceStateDoesNotAssignValue")
produceState(initialValue = cache.cached(key), key1 = key) {
cache.update(key) {
value = it
@@ -42,6 +43,7 @@ fun <K, V> produceCachedStateAsync(
key: String,
updateValue: K,
): State<V?> =
@Suppress("ProduceStateDoesNotAssignValue")
produceState(initialValue = cache.cached(updateValue), key1 = key) {
cache.update(updateValue) {
value = it
@@ -30,6 +30,7 @@ fun <K, V> produceCachedState(
cache: CachedState<K, V>,
key: K,
): State<V?> =
@Suppress("ProduceStateDoesNotAssignValue")
produceState(initialValue = cache.cached(key), key1 = key) {
val newValue = cache.update(key)
if (value != newValue) {
@@ -43,6 +44,7 @@ fun <K, V> produceCachedState(
key: String,
updateValue: K,
): State<V?> =
@Suppress("ProduceStateDoesNotAssignValue")
produceState(initialValue = cache.cached(updateValue), key1 = key) {
val newValue = cache.update(updateValue)
if (value != newValue) {