Refactored message restoring in MessagesImporter
This commit is contained in:
parent
842368d0f4
commit
8c0508b0c1
|
@ -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++
|
||||
|
|
Loading…
Reference in New Issue