-
-
Notifications
You must be signed in to change notification settings - Fork 6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add the "My Daily Life" sticker pack by Plastic Thing.
- Loading branch information
1 parent
3fca46d
commit 89b1243
Showing
4 changed files
with
67 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
app/src/main/java/org/thoughtcrime/securesms/migrations/StickerMyDailyLifeMigrationJob.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
package org.thoughtcrime.securesms.migrations; | ||
|
||
import androidx.annotation.NonNull; | ||
|
||
import org.thoughtcrime.securesms.dependencies.ApplicationDependencies; | ||
import org.thoughtcrime.securesms.jobmanager.Data; | ||
import org.thoughtcrime.securesms.jobmanager.Job; | ||
import org.thoughtcrime.securesms.jobs.StickerPackDownloadJob; | ||
import org.thoughtcrime.securesms.stickers.BlessedPacks; | ||
|
||
/** | ||
* Installs Piece of Cake blessed pack. | ||
*/ | ||
public class StickerMyDailyLifeMigrationJob extends MigrationJob { | ||
|
||
public static final String KEY = "StickerMyDailyLifeMigrationJob"; | ||
|
||
StickerMyDailyLifeMigrationJob() { | ||
this(new Parameters.Builder().build()); | ||
} | ||
|
||
private StickerMyDailyLifeMigrationJob(@NonNull Parameters parameters) { | ||
super(parameters); | ||
} | ||
|
||
@Override | ||
public boolean isUiBlocking() { | ||
return false; | ||
} | ||
|
||
@Override | ||
public @NonNull String getFactoryKey() { | ||
return KEY; | ||
} | ||
|
||
@Override | ||
public void performMigration() { | ||
ApplicationDependencies.getJobManager().add(StickerPackDownloadJob.forInstall(BlessedPacks.MY_DAILY_LIFE.getPackId(), BlessedPacks.MY_DAILY_LIFE.getPackKey(), false)); | ||
} | ||
|
||
@Override | ||
boolean shouldRetry(@NonNull Exception e) { | ||
return false; | ||
} | ||
|
||
public static class Factory implements Job.Factory<StickerMyDailyLifeMigrationJob> { | ||
@Override | ||
public @NonNull StickerMyDailyLifeMigrationJob create(@NonNull Parameters parameters, @NonNull Data data) { | ||
return new StickerMyDailyLifeMigrationJob(parameters); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
some spaces are missing