mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 17:29:32 +01:00
Add StickerPackId and StickerPackKey value classes.
This commit is contained in:
committed by
Cody Henthorne
parent
3779dfd290
commit
3fc386d4a3
@@ -252,10 +252,10 @@ class StickerTable(
|
||||
notifyStickerPackListeners()
|
||||
}
|
||||
|
||||
fun markPackAsInstalled(packKey: String, notify: Boolean) {
|
||||
fun markPackAsInstalled(packId: String, notify: Boolean) {
|
||||
updatePackInstalled(
|
||||
db = databaseHelper.signalWritableDatabase,
|
||||
packId = packKey,
|
||||
packId = packId,
|
||||
installed = true,
|
||||
notify = notify
|
||||
)
|
||||
|
||||
@@ -3,7 +3,7 @@ package org.thoughtcrime.securesms.database.model
|
||||
import java.util.Optional
|
||||
|
||||
/**
|
||||
* Represents a record for a sticker pack in the [StickerTable].
|
||||
* Represents a record for a sticker pack in the [org.thoughtcrime.securesms.database.StickerTable].
|
||||
*/
|
||||
data class StickerPackRecord(
|
||||
@JvmField val packId: String,
|
||||
@@ -19,3 +19,15 @@ data class StickerPackRecord(
|
||||
@JvmField
|
||||
val authorOptional: Optional<String> = if (author.isBlank()) Optional.empty() else Optional.of(author)
|
||||
}
|
||||
|
||||
/**
|
||||
* A unique identifier for a sticker pack.
|
||||
*/
|
||||
@JvmInline
|
||||
value class StickerPackId(val value: String)
|
||||
|
||||
/**
|
||||
* An encryption key for a sticker pack.
|
||||
*/
|
||||
@JvmInline
|
||||
value class StickerPackKey(val value: String)
|
||||
|
||||
Reference in New Issue
Block a user