prepareChangelogOverlay

suspend fun prepareChangelogOverlay(context: Context? = null, onlyIfUnseen: Boolean = false): Pair<List<ChangelogEntry>, SdkAppearance>?(source)

Prepares changelog entries and appearance styling for What's-New presentation overlays (dev.cupthread.feedback.ui.ChangelogOverlay and dev.cupthread.feedback.ui.presentLatestChangelog).

Automatically honors the console-configured changelogOverlay.entryCount setting, clamped between 1 and 10 entries.

When onlyIfUnseen is true and context is provided, checks ChangelogStore on the device and returns null if the latest release has already been viewed.

Return

A Pair containing the list of entries and the active SdkAppearance, or null if the changelog feature is disabled, no entries exist, or the latest entry was already seen.

Parameters

context

Optional Android Context used to look up seen changelog records in ChangelogStore.

onlyIfUnseen

If true, returns null when the latest changelog version or ID has already been marked as seen.

Throws

on network or parsing failure.

Example:

val overlayData = client.prepareChangelogOverlay(context, onlyIfUnseen = true)
if (overlayData != null) {
val (entries, appearance) = overlayData
println("Displaying ${entries.size} new updates with title '${appearance.changelogOverlay.title}'")
}