formatting

This commit is contained in:
Vitor Pamplona
2023-05-31 21:32:53 -04:00
parent 6072e5977e
commit 93e2af3c1f
4 changed files with 8 additions and 8 deletions
@@ -16,7 +16,6 @@ import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.getValue import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember import androidx.compose.runtime.remember
import androidx.compose.runtime.rememberCoroutineScope
import androidx.compose.runtime.setValue import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier import androidx.compose.ui.Modifier
@@ -31,7 +31,6 @@ import androidx.compose.runtime.MutableState
import androidx.compose.runtime.getValue import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember import androidx.compose.runtime.remember
import androidx.compose.runtime.rememberCoroutineScope
import androidx.compose.runtime.rememberUpdatedState import androidx.compose.runtime.rememberUpdatedState
import androidx.compose.runtime.setValue import androidx.compose.runtime.setValue
import androidx.compose.ui.Alignment import androidx.compose.ui.Alignment
@@ -64,7 +64,6 @@ import androidx.compose.ui.window.Dialog
import androidx.compose.ui.window.DialogProperties import androidx.compose.ui.window.DialogProperties
import coil.annotation.ExperimentalCoilApi import coil.annotation.ExperimentalCoilApi
import coil.compose.AsyncImage import coil.compose.AsyncImage
import coil.compose.AsyncImagePainter
import coil.imageLoader import coil.imageLoader
import com.google.accompanist.flowlayout.FlowRow import com.google.accompanist.flowlayout.FlowRow
import com.vitorpamplona.amethyst.R import com.vitorpamplona.amethyst.R
@@ -242,19 +241,22 @@ private fun LocalImageView(
contentScale = contentScale, contentScale = contentScale,
modifier = myModifier, modifier = myModifier,
onError = { onError = {
if (imageLoadingState != false) if (imageLoadingState != false) {
imageLoadingState = false imageLoadingState = false
}
}, },
onSuccess = { onSuccess = {
if (imageLoadingState != true) if (imageLoadingState != true) {
imageLoadingState = true imageLoadingState = true
} }
}
) )
} }
if (imageLoadingState == true) { if (imageLoadingState == true) {
if (content.isVerified != null) if (content.isVerified != null) {
HashVerificationSymbol(content.isVerified, Modifier.align(Alignment.TopEnd)) HashVerificationSymbol(content.isVerified, Modifier.align(Alignment.TopEnd))
}
} else if (imageLoadingState == false || content.localFile == null || !content.localFile.exists()) { } else if (imageLoadingState == false || content.localFile == null || !content.localFile.exists()) {
BlankNote() BlankNote()
} else { } else {
@@ -309,8 +311,9 @@ private fun UrlImageView(
contentScale = contentScale, contentScale = contentScale,
modifier = myModifier, modifier = myModifier,
onError = { onError = {
if (imageLoadingStatus != false) if (imageLoadingStatus != false) {
imageLoadingStatus = false imageLoadingStatus = false
}
}, },
onSuccess = { onSuccess = {
if (verifiedHash == null) { if (verifiedHash == null) {
@@ -5,7 +5,6 @@ import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.getValue import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.remember import androidx.compose.runtime.remember
import androidx.compose.runtime.rememberCoroutineScope
import androidx.compose.runtime.setValue import androidx.compose.runtime.setValue
import androidx.navigation.NavHostController import androidx.navigation.NavHostController
import androidx.navigation.compose.NavHost import androidx.navigation.compose.NavHost