mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 09:20:19 +01:00
Add new sticker packs.
- My Daily Life 2 - Rocky Talk - Cozy Season - Chug the Mouse - Croco's Feelings as blessed sticker packs
This commit is contained in:
@@ -192,9 +192,10 @@ public class ApplicationMigrations {
|
||||
static final int AEP_ROTATE_FIX = 148;
|
||||
static final int ATTACHMENT_HASH_BACKFILL_2 = 149;
|
||||
static final int SVR2_ENCLAVE_UPDATE_5 = 150;
|
||||
static final int STICKER_PACK_ADDITION_2 = 151;
|
||||
}
|
||||
|
||||
public static final int CURRENT_VERSION = 150;
|
||||
public static final int CURRENT_VERSION = 151;
|
||||
|
||||
/**
|
||||
* This *must* be called after the {@link JobManager} has been instantiated, but *before* the call
|
||||
@@ -889,6 +890,10 @@ public class ApplicationMigrations {
|
||||
jobs.put(Version.SVR2_ENCLAVE_UPDATE_5, new Svr2MirrorMigrationJob());
|
||||
}
|
||||
|
||||
if (lastSeenVersion < Version.STICKER_PACK_ADDITION_2) {
|
||||
jobs.put(Version.STICKER_PACK_ADDITION_2, new StickerPackAddition2MigrationJob());
|
||||
}
|
||||
|
||||
return jobs;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
package org.thoughtcrime.securesms.migrations
|
||||
|
||||
import org.thoughtcrime.securesms.dependencies.AppDependencies
|
||||
import org.thoughtcrime.securesms.jobmanager.Job
|
||||
import org.thoughtcrime.securesms.jobs.StickerPackDownloadJob
|
||||
import org.thoughtcrime.securesms.stickers.BlessedPacks
|
||||
|
||||
/**
|
||||
* Installs the second wave of blessed sticker packs. Some are installed by default, others as references.
|
||||
*/
|
||||
internal class StickerPackAddition2MigrationJob private constructor(parameters: Parameters) : MigrationJob(parameters) {
|
||||
|
||||
companion object {
|
||||
const val KEY = "StickerPackAddition2MigrationJob"
|
||||
}
|
||||
|
||||
internal constructor() : this(Parameters.Builder().build())
|
||||
|
||||
override fun isUiBlocking(): Boolean = false
|
||||
|
||||
override fun getFactoryKey(): String = KEY
|
||||
|
||||
override fun performMigration() {
|
||||
val jobManager = AppDependencies.jobManager
|
||||
|
||||
jobManager.add(StickerPackDownloadJob.forInstall(BlessedPacks.ROCKY_TALK.packId, BlessedPacks.ROCKY_TALK.packKey, false))
|
||||
jobManager.add(StickerPackDownloadJob.forInstall(BlessedPacks.CROCOS_FEELINGS.packId, BlessedPacks.CROCOS_FEELINGS.packKey, false))
|
||||
|
||||
jobManager.add(StickerPackDownloadJob.forReference(BlessedPacks.MY_DAILY_LIFE_2.packId, BlessedPacks.MY_DAILY_LIFE_2.packKey))
|
||||
jobManager.add(StickerPackDownloadJob.forReference(BlessedPacks.COZY_SEASON.packId, BlessedPacks.COZY_SEASON.packKey))
|
||||
jobManager.add(StickerPackDownloadJob.forReference(BlessedPacks.CHUG_THE_MOUSE.packId, BlessedPacks.CHUG_THE_MOUSE.packKey))
|
||||
}
|
||||
|
||||
override fun shouldRetry(e: Exception): Boolean = false
|
||||
|
||||
class Factory : Job.Factory<StickerPackAddition2MigrationJob> {
|
||||
override fun create(parameters: Parameters, serializedData: ByteArray?): StickerPackAddition2MigrationJob {
|
||||
return StickerPackAddition2MigrationJob(parameters)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user