Still Today wave when motion is reduced or animations are off (#157)

This commit is contained in:
makiolaj committed 2026-11-27 12:16:34 +01:00
1 parent aeaa175358
commit c65a252d1b
1 file changed
+4
@@ -62,6 +62,7 @@ import androidx.compose.material3.Scaffold
import androidx.compose.material3.Surface
import androidx.compose.material3.Text
import androidx.compose.material3.TopAppBarDefaults
import androidx.compose.material3.WavyProgressIndicatorDefaults
import androidx.compose.runtime.Composable
import androidx.compose.runtime.LaunchedEffect
import androidx.compose.runtime.getValue
@@ -103,6 +104,7 @@ import de.jeanlucmakiola.agendula.ui.common.SyncPullBox
import de.jeanlucmakiola.agendula.ui.common.priorityAccent
import de.jeanlucmakiola.agendula.ui.tasklist.priorityLabel
import de.jeanlucmakiola.floret.components.positionOf
import de.jeanlucmakiola.floret.identity.rememberLoopingMotion
import de.jeanlucmakiola.floret.time.formatDateTimeCompact
import java.time.LocalDate
import java.time.ZoneId
@@ -684,6 +686,8 @@ private fun TodayHero(done: Int, total: Int, onClick: () -> Unit) {
modifier = Modifier.fillMaxSize(),
color = MaterialTheme.colorScheme.onPrimaryContainer,
trackColor = MaterialTheme.colorScheme.onPrimaryContainer.copy(alpha = 0.22f),
// A still wave when motion is reduced or the system removed animations (#157).
waveSpeed = if (rememberLoopingMotion()) WavyProgressIndicatorDefaults.CircularWavelength else 0.dp,
)
Text(stringResource(R.string.progress_fraction_compact, done, total), style = MaterialTheme.typography.titleMedium)
}