All checks were successful
Release 2.19.2 — `versionName` 2.19.2 / `versionCode` 21902. Merging this cuts the release. A meeting you declined is struck through everywhere it appears and no longer schedules a reminder (#180). Tapping an event in month view opens the event instead of its day, in every month style (#187). An edit shows immediately when the same occurrence is re-opened (#196). The month widget's arrows died after a couple of taps: the grid serialised ~740 views and one update ran to 450–540 KB, which overran the launcher's async binder buffer and made Android drop the whole widget host — killing updates for every widget on the home screen. The grid is down to 192 views, and `SizeMode.Exact` is kept so a resized widget reflows instead of clipping (#214). Widget taps now redraw the tapped widget by its own id rather than `updateAll`, whose provider lookup is empty in a cold-woken process (#18). Jump-to-today in seamless weeks lands on the current week row (#191), and the day and week timelines got an end inset (#192). Two follow-ups beyond the issues: the detail re-read keeps the loaded content on screen instead of blinking back to the skeleton, and a month chip tap with no recorded touch down (TalkBack, D-pad) no longer resolves to the previous tap's chip. Release notes: `CHANGELOG.md` 2.19.2 section and `fastlane/metadata/android/en-US/changelogs/21902.txt` (471 chars). Closes #18 Closes #180 Closes #187 Closes #191 Closes #192 Closes #196 Closes #214 Co-authored-by: Jean-Luc Makiola <business@jeanlucmakiola.de> Reviewed-on: https://codeberg.org/jlmakiola/calendula/pulls/216
45 lines
1.7 KiB
Kotlin
45 lines
1.7 KiB
Kotlin
package de.jeanlucmakiola.calendula.widget
|
|
|
|
import android.os.Build
|
|
import androidx.compose.runtime.Composable
|
|
import androidx.glance.GlanceTheme
|
|
import androidx.glance.material3.ColorProviders
|
|
import androidx.glance.text.TextDecoration
|
|
import de.jeanlucmakiola.calendula.ui.theme.CalendulaDarkFallback
|
|
import de.jeanlucmakiola.calendula.ui.theme.CalendulaLightFallback
|
|
|
|
/**
|
|
* Brand fallback for devices without Material You dynamic colour (API < 31).
|
|
* Reuses the exact same hand-tuned schemes as the in-app theme
|
|
* ([CalendulaLightFallback] / [CalendulaDarkFallback]) so a widget on an older
|
|
* device matches the app surface-for-surface.
|
|
*/
|
|
private val CalendulaGlanceColors = ColorProviders(
|
|
light = CalendulaLightFallback,
|
|
dark = CalendulaDarkFallback,
|
|
)
|
|
|
|
/**
|
|
* Glance equivalent of `CalendulaTheme`. On API 31+ it follows the system's
|
|
* Material You palette (so the widget matches the home screen / the app's
|
|
* dynamic colour); below that it falls back to the brand scheme. Either way the
|
|
* widget draws only from M3 colour-role tokens (`GlanceTheme.colors.*`) — never
|
|
* a hardcoded colour — so it tracks light/dark automatically.
|
|
*/
|
|
@Composable
|
|
fun CalendulaGlanceTheme(content: @Composable () -> Unit) {
|
|
val colors = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
|
|
GlanceTheme.colors
|
|
} else {
|
|
CalendulaGlanceColors
|
|
}
|
|
GlanceTheme(colors = colors, content = content)
|
|
}
|
|
|
|
/**
|
|
* Glance's counterpart to the app's `declinedDecoration`: a declined invitation
|
|
* reads the same on the home screen as it does inside the app (#180).
|
|
*/
|
|
fun glanceDeclinedDecoration(isDeclined: Boolean): TextDecoration =
|
|
if (isDeclined) TextDecoration.LineThrough else TextDecoration.None
|