mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-04-21 00:59:49 +01:00
Update to latest Backup.proto and fix various backup bugs.
This commit is contained in:
committed by
mtang-signal
parent
e2e6a73e8d
commit
5ffb7b07da
@@ -1855,6 +1855,7 @@ class AttachmentTable(
|
||||
put(ARCHIVE_THUMBNAIL_MEDIA_ID, attachment.archiveThumbnailMediaId)
|
||||
put(THUMBNAIL_RESTORE_STATE, ThumbnailRestoreState.NEEDS_RESTORE.value)
|
||||
put(ATTACHMENT_UUID, attachment.uuid?.toString())
|
||||
put(BLUR_HASH, attachment.blurHash?.hash)
|
||||
|
||||
attachment.stickerLocator?.let { sticker ->
|
||||
put(STICKER_PACK_ID, sticker.packId)
|
||||
|
||||
@@ -13,7 +13,7 @@ import org.thoughtcrime.securesms.keyvalue.SignalStore
|
||||
class ChatColorsTable(context: Context, databaseHelper: SignalDatabase) : DatabaseTable(context, databaseHelper) {
|
||||
|
||||
companion object {
|
||||
private const val TABLE_NAME = "chat_colors"
|
||||
const val TABLE_NAME = "chat_colors"
|
||||
private const val ID = "_id"
|
||||
private const val CHAT_COLORS = "chat_colors"
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ import kotlin.time.Duration.Companion.seconds
|
||||
class InAppPaymentTable(context: Context, databaseHelper: SignalDatabase) : DatabaseTable(context, databaseHelper) {
|
||||
|
||||
companion object {
|
||||
private const val TABLE_NAME = "in_app_payment"
|
||||
const val TABLE_NAME = "in_app_payment"
|
||||
|
||||
/**
|
||||
* Row ID
|
||||
|
||||
@@ -234,6 +234,10 @@ public class KeyValueDatabase extends SQLiteOpenHelper implements SignalDatabase
|
||||
}
|
||||
}
|
||||
|
||||
public void clear() {
|
||||
getWritableDatabase().delete(TABLE_NAME, null, null);
|
||||
}
|
||||
|
||||
private enum Type {
|
||||
BLOB(0), BOOLEAN(1), FLOAT(2), INTEGER(3), LONG(4), STRING(5);
|
||||
|
||||
|
||||
@@ -126,7 +126,7 @@ object GroupsV2UpdateMessageConverter {
|
||||
fun translateDecryptedChangeUpdate(selfIds: ServiceIds, groupContext: DecryptedGroupV2Context): GroupChangeChatUpdate {
|
||||
var previousGroupState = groupContext.previousGroupState
|
||||
val change = groupContext.change!!
|
||||
if (DecryptedGroup().equals(previousGroupState)) {
|
||||
if (DecryptedGroup() == previousGroupState) {
|
||||
previousGroupState = null
|
||||
}
|
||||
val updates: MutableList<GroupChangeChatUpdate.Update> = LinkedList()
|
||||
|
||||
Reference in New Issue
Block a user