Fix backup/import issue with expiring messages.

There was an issue where we were backing up group receipts and attachments
that were for expiring messages (which are already excluded from the backup).

This commit excludes these items from the backup, and for backups made
before this change, this commit also deletes these invalid entries at
the end of the restore process.

We also do a little database migration to cleanup any bad state that may
have been imported in the past.
This commit is contained in:
Greyson Parrelli
2018-06-21 16:48:46 -07:00
parent 61b2da9c8a
commit 71a34dac5f
7 changed files with 82 additions and 6 deletions

View File

@@ -55,7 +55,7 @@ public class ThreadDatabase extends Database {
private static final String TAG = ThreadDatabase.class.getSimpleName();
static final String TABLE_NAME = "thread";
public static final String TABLE_NAME = "thread";
public static final String ID = "_id";
public static final String DATE = "date";
public static final String MESSAGE_COUNT = "message_count";