Changelog Store
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")
}Content copied to clipboard
Parameters
prefs
SharedPreferences instance where seen version tokens are stored.
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
Checks whether the user has already seen a changelog identified by versionOrId.
Link copied to clipboard
Marks the changelog entry identified by versionOrId as seen.
Link copied to clipboard
Marks the changelog entry identified by versionOrId as unseen.