Dedupe packs when reading from sticker table.

This commit is contained in:
Greyson Parrelli 2025-01-08 15:29:38 -05:00
parent 465c852e8b
commit 2da4fc1cd0

View file

@ -166,13 +166,16 @@ class StickerTable(
}
fun getAllStickerPacks(limit: String?): Cursor {
return readableDatabase
.select()
.from(TABLE_NAME)
.where("$COVER = 1")
.orderBy("$PACK_ORDER ASC")
.limit(limit ?: "")
.run()
return readableDatabase.query(
TABLE_NAME,
null,
"$COVER = 1",
null,
PACK_ID,
null,
"$PACK_ORDER ASC",
limit
)
}
fun getStickersForPack(packId: String): Cursor {