ChangelogStore

Persistent store for tracking seen changelog and release notes versions backed by SharedPreferences.

Used by FeedbackClient.prepareChangelogOverlay, dev.cupthread.feedback.ui.presentLatestChangelog, and dev.cupthread.feedback.ui.ChangelogOverlay to filter out release notes that the user has already viewed on this device.

Example Usage

val store = ChangelogStore.create(context)
if (!store.hasSeenChangelog("2.1.0")) {
// Show changelog banner or modal
store.markChangelogSeen("2.1.0")
}

Parameters

prefs

SharedPreferences instance where seen version tokens are stored.

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard

Clears all seen changelog records, causing all versions to be considered unseen again.

Link copied to clipboard

Retrieves the complete set of version labels and entry IDs marked as seen.

Link copied to clipboard
fun hasSeenChangelog(versionOrId: String): Boolean

Checks whether the user has already seen a changelog identified by versionOrId.

Link copied to clipboard
fun markChangelogSeen(versionOrId: String)

Marks the changelog entry identified by versionOrId as seen.

Link copied to clipboard
fun markChangelogUnseen(versionOrId: String)

Marks the changelog entry identified by versionOrId as unseen.