mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-26 11:51:10 +01:00
Add Change Number capability and Conversation Update item.
This commit is contained in:
committed by
Greyson Parrelli
parent
bb446ac1d5
commit
77ff25ec49
@@ -3,6 +3,7 @@ package org.thoughtcrime.securesms.migrations;
|
||||
import android.content.Context;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.VisibleForTesting;
|
||||
import androidx.lifecycle.LiveData;
|
||||
import androidx.lifecycle.MutableLiveData;
|
||||
|
||||
@@ -40,7 +41,8 @@ public class ApplicationMigrations {
|
||||
|
||||
private static final int LEGACY_CANONICAL_VERSION = 455;
|
||||
|
||||
private static final class Version {
|
||||
@VisibleForTesting
|
||||
static final class Version {
|
||||
static final int LEGACY = 1;
|
||||
static final int RECIPIENT_ID = 2;
|
||||
static final int RECIPIENT_SEARCH = 3;
|
||||
@@ -84,9 +86,10 @@ public class ApplicationMigrations {
|
||||
static final int STICKER_MY_DAILY_LIFE = 42;
|
||||
static final int SENDER_KEY_3 = 43;
|
||||
static final int CHANGE_NUMBER_SYNC = 44;
|
||||
static final int CHANGE_NUMBER_CAPABILITY = 45;
|
||||
}
|
||||
|
||||
public static final int CURRENT_VERSION = 43;
|
||||
public static final int CURRENT_VERSION = 45;
|
||||
|
||||
/**
|
||||
* This *must* be called after the {@link JobManager} has been instantiated, but *before* the call
|
||||
@@ -372,6 +375,10 @@ public class ApplicationMigrations {
|
||||
jobs.put(Version.CHANGE_NUMBER_SYNC, new AccountRecordMigrationJob());
|
||||
}
|
||||
|
||||
if (lastSeenVersion < Version.CHANGE_NUMBER_CAPABILITY) {
|
||||
jobs.put(Version.CHANGE_NUMBER_CAPABILITY, new AttributesMigrationJob());
|
||||
}
|
||||
|
||||
return jobs;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user