mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-03-18 05:41:56 +01:00
Fixes setting the value in the main thread
This commit is contained in:
parent
70d68c89c8
commit
35aeeb571c
@ -89,11 +89,9 @@ fun CashuPreview(
|
||||
initialValue = CachedCashuProcessor.cached(cashutoken),
|
||||
key1 = cashutoken,
|
||||
) {
|
||||
withContext(Dispatchers.IO) {
|
||||
val newToken = CachedCashuProcessor.parse(cashutoken)
|
||||
if (value != newToken) {
|
||||
value = newToken
|
||||
}
|
||||
val newToken = withContext(Dispatchers.Default) { CachedCashuProcessor.parse(cashutoken) }
|
||||
if (value != newToken) {
|
||||
value = newToken
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user