From a3166f4ff3341e097271570ad68ef9bd4429e144 Mon Sep 17 00:00:00 2001 From: Giovanni Gatti <156141003+geovnn@users.noreply.github.com> Date: Tue, 8 Oct 2024 12:13:47 +0200 Subject: [PATCH] Add animation to notification chart --- .../loggedIn/notifications/NotificationSummaryView.kt | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/notifications/NotificationSummaryView.kt b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/notifications/NotificationSummaryView.kt index 9e434a3c0..7e16002b2 100644 --- a/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/notifications/NotificationSummaryView.kt +++ b/amethyst/src/main/java/com/vitorpamplona/amethyst/ui/screen/loggedIn/notifications/NotificationSummaryView.kt @@ -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 =