mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-23 20:48:43 +00:00
Schedule a migration to fetch the latest search index.
This commit is contained in:
@@ -104,9 +104,10 @@ public class ApplicationMigrations {
|
||||
static final int EMOJI_VERSION_7 = 60;
|
||||
static final int MY_STORY_PRIVACY_MODE = 61;
|
||||
static final int REFRESH_EXPIRING_CREDENTIAL = 62;
|
||||
static final int EMOJI_SEARCH_INDEX_10 = 63;
|
||||
}
|
||||
|
||||
public static final int CURRENT_VERSION = 62;
|
||||
public static final int CURRENT_VERSION = 63;
|
||||
|
||||
/**
|
||||
* This *must* be called after the {@link JobManager} has been instantiated, but *before* the call
|
||||
@@ -456,6 +457,10 @@ public class ApplicationMigrations {
|
||||
jobs.put(Version.REFRESH_EXPIRING_CREDENTIAL, new AttributesMigrationJob());
|
||||
}
|
||||
|
||||
if (lastSeenVersion < Version.EMOJI_SEARCH_INDEX_10) {
|
||||
jobs.put(Version.EMOJI_SEARCH_INDEX_10, new EmojiDownloadMigrationJob());
|
||||
}
|
||||
|
||||
return jobs;
|
||||
}
|
||||
|
||||
|
||||
@@ -6,9 +6,10 @@ import org.thoughtcrime.securesms.dependencies.ApplicationDependencies;
|
||||
import org.thoughtcrime.securesms.jobmanager.Data;
|
||||
import org.thoughtcrime.securesms.jobmanager.Job;
|
||||
import org.thoughtcrime.securesms.jobs.DownloadLatestEmojiDataJob;
|
||||
import org.thoughtcrime.securesms.jobs.EmojiSearchIndexDownloadJob;
|
||||
|
||||
/**
|
||||
* Schedules a emoji download job to get the latest version.
|
||||
* Schedules jobs to get the latest emoji and search index.
|
||||
*/
|
||||
public final class EmojiDownloadMigrationJob extends MigrationJob {
|
||||
|
||||
@@ -35,6 +36,7 @@ public final class EmojiDownloadMigrationJob extends MigrationJob {
|
||||
@Override
|
||||
public void performMigration() {
|
||||
ApplicationDependencies.getJobManager().add(new DownloadLatestEmojiDataJob(false));
|
||||
EmojiSearchIndexDownloadJob.scheduleImmediately();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user