availableAds

abstract val availableAds: StateFlow<Int>(source)

Number of ads currently available for acquire, as a live signal.

Consumers that render one ad per list row should key their acquisition effect on this so a row that got null from acquire retries when inventory frees up. Without it, acquire() returning null was terminal for that composition: with cachePolicy.maxSize = 1 and one row holding the ad, every other row rendered blank forever.

Note this counts only available ads. AdCachePolicy.maxSize budgets available + in-use, so releasing a lease frees a slot without incrementing this value — the next preload is what refills it.