Sticker management v2 – Improve list animations and state transitions.

- Uninstall selected packs in a single database transaction to avoid UI flickering.
- Add section header keys to prevent them from animating wildly while scrolling.
This commit is contained in:
Jeffrey Starke
2025-05-14 17:10:41 -04:00
committed by GitHub
parent 8b828677de
commit f3a475d0c8
5 changed files with 38 additions and 18 deletions

View File

@@ -38,6 +38,7 @@ import org.thoughtcrime.securesms.database.model.MmsMessageRecord
import org.thoughtcrime.securesms.database.model.ParentStoryId
import org.thoughtcrime.securesms.database.model.ParentStoryId.DirectReply
import org.thoughtcrime.securesms.database.model.ParentStoryId.GroupReply
import org.thoughtcrime.securesms.database.model.StickerPackId
import org.thoughtcrime.securesms.database.model.StoryType
import org.thoughtcrime.securesms.database.model.databaseprotos.BodyRangeList
import org.thoughtcrime.securesms.database.model.databaseprotos.GiftBadge
@@ -1075,7 +1076,7 @@ object SyncMessageProcessor {
when (operation.type!!) {
StickerPackOperation.Type.INSTALL -> jobManager.add(StickerPackDownloadJob.forInstall(packId, packKey, false))
StickerPackOperation.Type.REMOVE -> SignalDatabase.stickers.uninstallPack(packId)
StickerPackOperation.Type.REMOVE -> SignalDatabase.stickers.uninstallPacks(setOf(StickerPackId(packId)))
}
} else {
warn("Received incomplete sticker pack operation sync.")