mirror of
https://github.com/SimpleMobileTools/Simple-SMS-Messenger.git
synced 2024-12-29 09:39:59 +01:00
minor code cleanup
This commit is contained in:
parent
3cd84e42bc
commit
de57cc3085
@ -1,12 +1,9 @@
|
||||
package com.simplemobiletools.smsmessenger.helpers
|
||||
|
||||
import android.content.Context
|
||||
import android.net.Uri
|
||||
import android.provider.Telephony.*
|
||||
import android.util.Log
|
||||
import com.google.gson.Gson
|
||||
import com.google.gson.reflect.TypeToken
|
||||
import com.simplemobiletools.commons.extensions.queryCursor
|
||||
import com.simplemobiletools.commons.extensions.showErrorToast
|
||||
import com.simplemobiletools.commons.helpers.ensureBackgroundThread
|
||||
import com.simplemobiletools.smsmessenger.extensions.*
|
||||
@ -44,6 +41,7 @@ class MessagesImporter(private val context: Context) {
|
||||
callback.invoke(IMPORT_NOTHING_NEW)
|
||||
return@ensureBackgroundThread
|
||||
}
|
||||
|
||||
onProgress.invoke(totalMessages, messagesImported)
|
||||
for (message in messages) {
|
||||
if (config.importSms) {
|
||||
@ -70,9 +68,7 @@ class MessagesImporter(private val context: Context) {
|
||||
|
||||
callback.invoke(
|
||||
when {
|
||||
messagesImported == 0 -> {
|
||||
IMPORT_FAIL
|
||||
}
|
||||
messagesImported == 0 -> IMPORT_FAIL
|
||||
messagesFailed > 0 -> IMPORT_PARTIAL
|
||||
else -> IMPORT_OK
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user