diff options
author | Christian Schneppe <christian@pix-art.de> | 2019-01-26 15:12:38 +0100 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2019-01-26 15:12:38 +0100 |
commit | 05c1aa03779b6bf2a45e2ab89cb7e7f486eac037 (patch) | |
tree | d005f99a390efb3d3e14760c75d58e0359049e2f /src/main/java/de/pixart/messenger/services | |
parent | 28c12f9fa868dd5273a80c305c69ae0106329c37 (diff) |
show spinning wheel in restore backup activity
Diffstat (limited to 'src/main/java/de/pixart/messenger/services')
-rw-r--r-- | src/main/java/de/pixart/messenger/services/ImportBackupService.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main/java/de/pixart/messenger/services/ImportBackupService.java b/src/main/java/de/pixart/messenger/services/ImportBackupService.java index e73b1972f..63d6c7b41 100644 --- a/src/main/java/de/pixart/messenger/services/ImportBackupService.java +++ b/src/main/java/de/pixart/messenger/services/ImportBackupService.java @@ -102,6 +102,10 @@ public class ImportBackupService extends Service { return START_NOT_STICKY; } + public boolean getLoadingState() { + return running.get(); + } + public void loadBackupFiles(OnBackupFilesLoaded onBackupFilesLoaded) { executor.execute(() -> { List<Jid> accounts = mDatabaseBackend.getAccountJids(false); @@ -128,13 +132,14 @@ public class ImportBackupService extends Service { } } } + Collections.sort(backupFiles, (a, b) -> a.header.getJid().toString().compareTo(b.header.getJid().toString())); onBackupFilesLoaded.onBackupFilesLoaded(backupFiles); }); } private void startForegroundService() { NotificationCompat.Builder mBuilder = new NotificationCompat.Builder(getBaseContext(), "backup"); - mBuilder.setContentTitle(getString(R.string.notification_restore_backup_title)) + mBuilder.setContentTitle(getString(R.string.restoring_backup)) .setSmallIcon(R.drawable.ic_unarchive_white_24dp) .setProgress(1, 0, true); startForeground(NOTIFICATION_ID, mBuilder.build()); |