diff --git a/composeApp/src/commonMain/kotlin/com/nuvio/app/features/profiles/ProfileEditScreen.kt b/composeApp/src/commonMain/kotlin/com/nuvio/app/features/profiles/ProfileEditScreen.kt index 5f00697d7..f8e0ca9b3 100644 --- a/composeApp/src/commonMain/kotlin/com/nuvio/app/features/profiles/ProfileEditScreen.kt +++ b/composeApp/src/commonMain/kotlin/com/nuvio/app/features/profiles/ProfileEditScreen.kt @@ -54,6 +54,7 @@ import com.nuvio.app.core.ui.NuvioScreen import com.nuvio.app.core.ui.NuvioScreenHeader import com.nuvio.app.core.ui.NuvioStatusModal import com.nuvio.app.core.ui.NuvioSurfaceCard +import com.nuvio.app.features.home.components.CollectionCardRemoteImage import kotlinx.coroutines.launch import nuvio.composeapp.generated.resources.* import org.jetbrains.compose.resources.stringResource @@ -408,11 +409,12 @@ private fun ProfileIdentityCard( contentAlignment = Alignment.Center, ) { if (customAvatarUrl != null) { - AsyncImage( - model = customAvatarUrl, + CollectionCardRemoteImage( + imageUrl = customAvatarUrl, contentDescription = name, - modifier = Modifier.size(88.dp).clip(CircleShape), + modifier = Modifier.fillMaxSize(), contentScale = ContentScale.Crop, + animateIfPossible = true, ) } else if (selectedAvatar != null) { AsyncImage( diff --git a/composeApp/src/commonMain/kotlin/com/nuvio/app/features/profiles/ProfileSelectionScreen.kt b/composeApp/src/commonMain/kotlin/com/nuvio/app/features/profiles/ProfileSelectionScreen.kt index 195ba6748..ec8a99a8a 100644 --- a/composeApp/src/commonMain/kotlin/com/nuvio/app/features/profiles/ProfileSelectionScreen.kt +++ b/composeApp/src/commonMain/kotlin/com/nuvio/app/features/profiles/ProfileSelectionScreen.kt @@ -59,6 +59,7 @@ import androidx.lifecycle.compose.collectAsStateWithLifecycle import coil3.compose.AsyncImage import com.nuvio.app.core.auth.AuthRepository import com.nuvio.app.core.auth.AuthState +import com.nuvio.app.features.home.components.CollectionCardRemoteImage import kotlinx.coroutines.delay import kotlinx.coroutines.launch import nuvio.composeapp.generated.resources.* @@ -373,11 +374,12 @@ private fun ProfileAvatarCard( contentAlignment = Alignment.Center, ) { if (avatarImageUrl != null) { - AsyncImage( - model = avatarImageUrl, + CollectionCardRemoteImage( + imageUrl = avatarImageUrl, contentDescription = avatarItem?.displayName ?: profile.name, - modifier = Modifier.size(100.dp).clip(CircleShape), + modifier = Modifier.fillMaxSize(), contentScale = ContentScale.Crop, + animateIfPossible = true, ) } else if (profile.name.isNotBlank()) { Text( diff --git a/composeApp/src/commonMain/kotlin/com/nuvio/app/features/profiles/ProfileSwitcherTab.kt b/composeApp/src/commonMain/kotlin/com/nuvio/app/features/profiles/ProfileSwitcherTab.kt index a399c8220..46c38992f 100644 --- a/composeApp/src/commonMain/kotlin/com/nuvio/app/features/profiles/ProfileSwitcherTab.kt +++ b/composeApp/src/commonMain/kotlin/com/nuvio/app/features/profiles/ProfileSwitcherTab.kt @@ -21,6 +21,7 @@ import androidx.compose.foundation.layout.Box import androidx.compose.foundation.layout.Column import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.height import androidx.compose.foundation.layout.imePadding @@ -69,6 +70,7 @@ import androidx.compose.ui.window.Popup import androidx.compose.ui.window.PopupProperties import androidx.lifecycle.compose.collectAsStateWithLifecycle import coil3.compose.AsyncImage +import com.nuvio.app.features.home.components.CollectionCardRemoteImage import com.nuvio.app.isIos import kotlinx.coroutines.delay import kotlinx.coroutines.launch @@ -504,11 +506,12 @@ private fun PopupProfileBubble( contentAlignment = Alignment.Center, ) { if (avatarImageUrl != null) { - AsyncImage( - model = avatarImageUrl, + CollectionCardRemoteImage( + imageUrl = avatarImageUrl, contentDescription = profile.name, - modifier = Modifier.size(48.dp).clip(CircleShape), + modifier = Modifier.fillMaxSize(), contentScale = ContentScale.Crop, + animateIfPossible = true, ) } else if (profile.name.isNotBlank()) { Text( @@ -818,11 +821,12 @@ fun ActiveProfileMiniAvatar( contentAlignment = Alignment.Center, ) { if (avatarImageUrl != null) { - AsyncImage( - model = avatarImageUrl, + CollectionCardRemoteImage( + imageUrl = avatarImageUrl, contentDescription = profile.name, - modifier = Modifier.size(size.dp).clip(CircleShape), + modifier = Modifier.fillMaxSize(), contentScale = ContentScale.Crop, + animateIfPossible = true, ) } else if (profile.name.isNotBlank()) { Text( diff --git a/composeApp/src/iosMain/kotlin/com/nuvio/app/features/home/components/CollectionCardRemoteImage.ios.kt b/composeApp/src/iosMain/kotlin/com/nuvio/app/features/home/components/CollectionCardRemoteImage.ios.kt index 7f1e5c69e..54cb6af12 100644 --- a/composeApp/src/iosMain/kotlin/com/nuvio/app/features/home/components/CollectionCardRemoteImage.ios.kt +++ b/composeApp/src/iosMain/kotlin/com/nuvio/app/features/home/components/CollectionCardRemoteImage.ios.kt @@ -96,6 +96,7 @@ internal actual fun CollectionCardRemoteImage( UIKitView( modifier = modifier, + interactive = false, factory = { UIImageView().apply { contentMode = UIViewContentMode.UIViewContentModeScaleAspectFill