commonMain.app.bsky.actor.BskyAppStatePref.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bluesky Show documentation
Show all versions of bluesky Show documentation
Bluesky Social API bindings for Kotlin.
The newest version!
@file:Suppress("DEPRECATION")
package app.bsky.actor
import kotlin.String
import kotlin.Suppress
import kotlinx.collections.immutable.persistentListOf
import kotlinx.serialization.Serializable
import sh.christian.ozone.api.model.ReadOnlyList
/**
* A grab bag of state that's specific to the bsky.app program. Third-party apps shouldn't use this.
*
* @param queuedNudges An array of tokens which identify nudges (modals, popups, tours, highlight
* dots) that should be shown to the user.
* @param nuxs Storage for NUXs the user has encountered.
*/
@Serializable
public data class BskyAppStatePref(
public val activeProgressGuide: BskyAppProgressGuide? = null,
/**
* An array of tokens which identify nudges (modals, popups, tours, highlight dots) that should be
* shown to the user.
*/
public val queuedNudges: ReadOnlyList = persistentListOf(),
/**
* Storage for NUXs the user has encountered.
*/
public val nuxs: ReadOnlyList = persistentListOf(),
) {
init {
require(queuedNudges.count() <= 1_000) {
"queuedNudges.count() must be <= 1_000, but was ${queuedNudges.count()}"
}
require(queuedNudges.count() <= 100) {
"queuedNudges.count() must be <= 100, but was ${queuedNudges.count()}"
}
require(nuxs.count() <= 100) {
"nuxs.count() must be <= 100, but was ${nuxs.count()}"
}
}
}