ReviewEligibility
object ReviewEligibility
Pure engagement-gating logic for the in-app review prompt.
A prompt is eligible only when ALL hold:
the account is at least ReviewGateConfig.minAccountAgeDays old (since first open),
the user has performed at least ReviewGateConfig.minInteractions meaningful interactions,
and at least ReviewGateConfig.cooldownDays have passed since the last prompt (if ever shown).
No platform deps, the counters live in a ReviewState supplied by the caller (persisted however the app likes — DataStore, NSUserDefaults, …), so this is trivially unit-testable.
Functions
Link copied to clipboard
fun isEligible(state: ReviewState, nowMillis: Long, config: ReviewGateConfig = ReviewGateConfig()): Boolean