Skip to content

Commit e2b067b

Browse files
committed
Add landscapist-animation dependency and implement crossfade animation
1 parent 1afbca8 commit e2b067b

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

core-designsystem/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ plugins {
2222
dependencies {
2323
// image loading
2424
api(libs.landscapist.glide)
25+
api(libs.landscapist.animation)
2526
api(libs.landscapist.placeholder)
2627

2728
api(libs.androidx.compose.runtime)

feature-chats/src/main/kotlin/io/getstream/whatsappclone/chats/messages/WhatsAppMessageTopBar.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@ import androidx.compose.ui.draw.clip
3535
import androidx.compose.ui.tooling.preview.Preview
3636
import androidx.compose.ui.unit.dp
3737
import androidx.lifecycle.compose.collectAsStateWithLifecycle
38+
import com.skydoves.landscapist.animation.crossfade.CrossfadePlugin
39+
import com.skydoves.landscapist.components.rememberImageComponent
3840
import com.skydoves.landscapist.glide.GlideImage
3941
import io.getstream.chat.android.client.ChatClient
4042
import io.getstream.whatsappclone.designsystem.component.WhatsAppLoadingIndicator
@@ -118,6 +120,9 @@ private fun WhatsAppMessageUserInfo(
118120
messageUiState.data.image.takeIf { it.isNotEmpty() }
119121
?: io.getstream.whatsappclone.designsystem.R.drawable.stream_logo
120122
},
123+
component = rememberImageComponent {
124+
+CrossfadePlugin()
125+
},
121126
previewPlaceholder = io.getstream.whatsappclone.designsystem.R.drawable.placeholder
122127
)
123128

gradle/libs.versions.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ stream-compose = { group = "io.getstream", name = "stream-chat-android-compose",
4646
sealedx-core = { group = "com.github.skydoves", name = "sealedx-core", version.ref = "sealedx" }
4747
sealedx-processor = { group = "com.github.skydoves", name = "sealedx-processor", version.ref = "sealedx" }
4848
landscapist-glide = { group = "com.github.skydoves", name = "landscapist-glide", version.ref = "landscapist" }
49+
landscapist-animation = { group = "com.github.skydoves", name = "landscapist-animation", version.ref = "landscapist" }
4950
landscapist-placeholder = { group = "com.github.skydoves", name = "landscapist-placeholder", version.ref = "landscapist" }
5051
accompanist-pager = { group = "com.google.accompanist", name = "accompanist-pager", version.ref = "accompanist" }
5152
accompanist-indicator = { group = "com.google.accompanist", name = "accompanist-pager-indicators", version.ref = "accompanist" }

0 commit comments

Comments
 (0)