decide

fun <T> decide(storeData: StoreData<T>, connectivity: Connectivity, ttl: Duration, now: Instant, classify: (Throwable) -> ErrorKind = { ErrorKind.Other }): ScreenState<T>

Parameters

storeData

latest snapshot (data / error / fetchedAt / isRefreshing).

connectivity

current link state; Connectivity.CaptivePortal counts as offline for content decisions but surfaces a distinct flag.

ttl

freshness bound for the ScreenState.Content band.

now

current instant (injected for testability).

classify

maps an error to a ErrorKind; drives the no-data error branch.