Sync mute status via storage service.

This commit is contained in:
Greyson Parrelli
2021-04-08 13:50:50 -04:00
parent 25ce2a649a
commit e096ba27ce
12 changed files with 158 additions and 31 deletions

View File

@@ -40,7 +40,7 @@ public class ApplicationMigrations {
private static final int LEGACY_CANONICAL_VERSION = 455;
public static final int CURRENT_VERSION = 30;
public static final int CURRENT_VERSION = 31;
private static final class Version {
static final int LEGACY = 1;
@@ -71,6 +71,8 @@ public class ApplicationMigrations {
static final int DAY_BY_DAY_STICKERS = 26;
static final int BLOB_LOCATION = 27;
static final int SYSTEM_NAME_SPLIT = 28;
// Versions 29, 30 accidentally skipped
static final int MUTE_SYNC = 31;
}
/**
@@ -301,6 +303,10 @@ public class ApplicationMigrations {
jobs.put(Version.SYSTEM_NAME_SPLIT, new DirectoryRefreshMigrationJob());
}
if (lastSeenVersion < Version.MUTE_SYNC) {
jobs.put(Version.MUTE_SYNC, new StorageServiceMigrationJob());
}
return jobs;
}

View File

@@ -11,6 +11,9 @@ import org.thoughtcrime.securesms.jobs.MultiDeviceKeysUpdateJob;
import org.thoughtcrime.securesms.jobs.StorageSyncJob;
import org.thoughtcrime.securesms.util.TextSecurePreferences;
/**
* Just runs a storage sync. Useful if you've started syncing a new field to storage service.
*/
public class StorageServiceMigrationJob extends MigrationJob {
private static final String TAG = Log.tag(StorageServiceMigrationJob.class);