Refactored message restoring in MessagesImporter

This commit is contained in:
merkost 2023-07-22 00:31:24 +10:00
parent 842368d0f4
commit 8c0508b0c1
1 changed files with 3 additions and 2 deletions

View File

@ -66,10 +66,11 @@ class MessagesImporter(private val activity: SimpleActivity) {
try {
if (message.backupType == BackupType.SMS && config.importSms) {
messageWriter.writeSmsMessage(message as SmsBackup)
messagesImported++
} else if (message.backupType == BackupType.MMS && config.importMms) {
messageWriter.writeMmsMessage(message as MmsBackup)
} else return@forEach
messagesImported++
}
} catch (e: Exception) {
activity.showErrorToast(e)
messagesFailed++