Add animation to notification chart

This commit is contained in:
Giovanni Gatti 2024-10-08 12:13:47 +02:00
parent 9340c440f5
commit a3166f4ff3
No known key found for this signature in database
GPG Key ID: 001A19EE2FEDD8A7

View File

@ -20,6 +20,11 @@
*/
package com.vitorpamplona.amethyst.ui.screen.loggedIn.notifications
import androidx.compose.animation.AnimatedVisibility
import androidx.compose.animation.expandVertically
import androidx.compose.animation.shrinkVertically
import androidx.compose.animation.slideInVertically
import androidx.compose.animation.slideOutVertically
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.padding
@ -73,7 +78,11 @@ fun SummaryBar(state: NotificationSummaryState) {
UserReactionsRow(state) { showChart = !showChart }
if (showChart) {
AnimatedVisibility(
visible = showChart,
enter = slideInVertically() + expandVertically(),
exit = slideOutVertically() + shrinkVertically(),
) {
val lineChartCount =
lineChart(
lines =