mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-27 12:05:22 +00:00
Actually increment event count
This commit is contained in:
parent
40d14698b8
commit
11ce4ee807
@ -85,13 +85,13 @@ public class FullBackupExporter extends FullBackupBase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (BackupProtos.SharedPreference preference : IdentityKeyUtil.getBackupRecord(context)) {
|
for (BackupProtos.SharedPreference preference : IdentityKeyUtil.getBackupRecord(context)) {
|
||||||
EventBus.getDefault().post(new BackupEvent(BackupEvent.Type.PROGRESS, count));
|
EventBus.getDefault().post(new BackupEvent(BackupEvent.Type.PROGRESS, ++count));
|
||||||
outputStream.write(preference);
|
outputStream.write(preference);
|
||||||
}
|
}
|
||||||
|
|
||||||
outputStream.writeEnd();
|
outputStream.writeEnd();
|
||||||
outputStream.close();
|
outputStream.close();
|
||||||
EventBus.getDefault().post(new BackupEvent(BackupEvent.Type.FINISHED, count));
|
EventBus.getDefault().post(new BackupEvent(BackupEvent.Type.FINISHED, ++count));
|
||||||
}
|
}
|
||||||
|
|
||||||
private static List<String> exportSchema(@NonNull SQLiteDatabase input, @NonNull BackupFrameOutputStream outputStream)
|
private static List<String> exportSchema(@NonNull SQLiteDatabase input, @NonNull BackupFrameOutputStream outputStream)
|
||||||
@ -133,7 +133,7 @@ public class FullBackupExporter extends FullBackupBase {
|
|||||||
|
|
||||||
try (Cursor cursor = input.rawQuery("SELECT * FROM " + table, null)) {
|
try (Cursor cursor = input.rawQuery("SELECT * FROM " + table, null)) {
|
||||||
while (cursor != null && cursor.moveToNext()) {
|
while (cursor != null && cursor.moveToNext()) {
|
||||||
EventBus.getDefault().post(new BackupEvent(BackupEvent.Type.PROGRESS, count));
|
EventBus.getDefault().post(new BackupEvent(BackupEvent.Type.PROGRESS, ++count));
|
||||||
|
|
||||||
if (predicate == null || predicate.test(cursor)) {
|
if (predicate == null || predicate.test(cursor)) {
|
||||||
StringBuilder statement = new StringBuilder(template);
|
StringBuilder statement = new StringBuilder(template);
|
||||||
|
Loading…
Reference in New Issue
Block a user