kopia lustrzana https://github.com/vitorpamplona/amethyst
Calculates hash in the IO thread from Compose's scope.
rodzic
0cbddad9c0
commit
1553640c18
|
@ -141,6 +141,7 @@ import kotlinx.coroutines.CancellationException
|
||||||
import kotlinx.coroutines.Dispatchers
|
import kotlinx.coroutines.Dispatchers
|
||||||
import kotlinx.coroutines.delay
|
import kotlinx.coroutines.delay
|
||||||
import kotlinx.coroutines.launch
|
import kotlinx.coroutines.launch
|
||||||
|
import kotlinx.coroutines.withContext
|
||||||
import net.engawapg.lib.zoomable.rememberZoomState
|
import net.engawapg.lib.zoomable.rememberZoomState
|
||||||
import net.engawapg.lib.zoomable.zoomable
|
import net.engawapg.lib.zoomable.zoomable
|
||||||
|
|
||||||
|
@ -542,7 +543,10 @@ fun ShowHash(
|
||||||
|
|
||||||
if (content.hash != null) {
|
if (content.hash != null) {
|
||||||
LaunchedEffect(key1 = content.url) {
|
LaunchedEffect(key1 = content.url) {
|
||||||
val newVerifiedHash = verifyHash(content)
|
val newVerifiedHash =
|
||||||
|
withContext(Dispatchers.IO) {
|
||||||
|
verifyHash(content)
|
||||||
|
}
|
||||||
if (newVerifiedHash != verifiedHash) {
|
if (newVerifiedHash != verifiedHash) {
|
||||||
verifiedHash = newVerifiedHash
|
verifiedHash = newVerifiedHash
|
||||||
}
|
}
|
||||||
|
|
Ładowanie…
Reference in New Issue