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:
@@ -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 }
|
||||
}
|
||||
Reference in New Issue
Block a user