mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-07-13 01:56:42 +02:00
Fixes setting the value in the main thread
This commit is contained in:
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user