perf: unified splash held until loaded, smoother month scrolling, serialized loads

- Single system splash (core-splashscreen) kept on screen until the first
  events load (StartupState), then reveals the ready app — removes the
  two-stage 'icon then title' splash and the laggy half-loaded entry
- Month scrolling: dropped per-row BoxWithConstraints (measured grid width once
  via onSizeChanged) and resolve bar colours once during packing instead of
  every recomposition → much smoother scroll
- Serialize all event loads behind a Mutex and skip redundant state writes so
  scroll-triggered month loads no longer pile up / thrash the UI

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Guido Schmit
2026-05-31 14:53:06 +02:00
parent 3734e17c3f
commit ba7daf8559
6 changed files with 112 additions and 130 deletions

View File

@@ -0,0 +1,15 @@
package com.scarriffle.calendarr.data
import kotlinx.coroutines.flow.MutableStateFlow
import javax.inject.Inject
import javax.inject.Singleton
/**
* Shared startup readiness flag used to keep the system splash screen on screen
* until the first events have loaded (so the app never appears mid-load).
*/
@Singleton
class StartupState @Inject constructor() {
val ready = MutableStateFlow(false)
fun markReady() { ready.value = true }
}