mirror of
https://github.com/SimpleMobileTools/Simple-SMS-Messenger.git
synced 2025-01-17 02:48:39 +01:00
remove unused callback in ImportMessagesDialog
This commit is contained in:
parent
3cd84e42bc
commit
24c08613d9
@ -398,13 +398,7 @@ class MainActivity : SimpleActivity() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun showImportEventsDialog(path: String) {
|
private fun showImportEventsDialog(path: String) {
|
||||||
ImportMessagesDialog(this, path) { refresh ->
|
ImportMessagesDialog(this, path)
|
||||||
if (refresh) {
|
|
||||||
runOnUiThread {
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun tryImportMessagesFromFile(uri: Uri) {
|
private fun tryImportMessagesFromFile(uri: Uri) {
|
||||||
|
@ -9,7 +9,6 @@ import com.simplemobiletools.smsmessenger.R
|
|||||||
import com.simplemobiletools.smsmessenger.activities.SimpleActivity
|
import com.simplemobiletools.smsmessenger.activities.SimpleActivity
|
||||||
import com.simplemobiletools.smsmessenger.extensions.config
|
import com.simplemobiletools.smsmessenger.extensions.config
|
||||||
import com.simplemobiletools.smsmessenger.helpers.MessagesImporter
|
import com.simplemobiletools.smsmessenger.helpers.MessagesImporter
|
||||||
import com.simplemobiletools.smsmessenger.helpers.MessagesImporter.ImportResult.IMPORT_FAIL
|
|
||||||
import com.simplemobiletools.smsmessenger.helpers.MessagesImporter.ImportResult.IMPORT_OK
|
import com.simplemobiletools.smsmessenger.helpers.MessagesImporter.ImportResult.IMPORT_OK
|
||||||
import com.simplemobiletools.smsmessenger.helpers.MessagesImporter.ImportResult.IMPORT_PARTIAL
|
import com.simplemobiletools.smsmessenger.helpers.MessagesImporter.ImportResult.IMPORT_PARTIAL
|
||||||
import kotlinx.android.synthetic.main.dialog_import_messages.view.import_mms_checkbox
|
import kotlinx.android.synthetic.main.dialog_import_messages.view.import_mms_checkbox
|
||||||
@ -18,7 +17,6 @@ import kotlinx.android.synthetic.main.dialog_import_messages.view.import_sms_che
|
|||||||
class ImportMessagesDialog(
|
class ImportMessagesDialog(
|
||||||
private val activity: SimpleActivity,
|
private val activity: SimpleActivity,
|
||||||
private val path: String,
|
private val path: String,
|
||||||
private val callback: (refresh: Boolean) -> Unit,
|
|
||||||
) {
|
) {
|
||||||
|
|
||||||
private val config = activity.config
|
private val config = activity.config
|
||||||
@ -35,7 +33,7 @@ class ImportMessagesDialog(
|
|||||||
.create().apply {
|
.create().apply {
|
||||||
activity.setupDialogStuff(view, this, R.string.import_messages) {
|
activity.setupDialogStuff(view, this, R.string.import_messages) {
|
||||||
getButton(AlertDialog.BUTTON_POSITIVE).setOnClickListener {
|
getButton(AlertDialog.BUTTON_POSITIVE).setOnClickListener {
|
||||||
if(!view.import_sms_checkbox.isChecked && !view.import_mms_checkbox.isChecked){
|
if (!view.import_sms_checkbox.isChecked && !view.import_mms_checkbox.isChecked) {
|
||||||
activity.toast(R.string.import_unchecked_error_message)
|
activity.toast(R.string.import_unchecked_error_message)
|
||||||
return@setOnClickListener
|
return@setOnClickListener
|
||||||
}
|
}
|
||||||
@ -62,6 +60,5 @@ class ImportMessagesDialog(
|
|||||||
else -> R.string.no_items_found
|
else -> R.string.no_items_found
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
callback(result != IMPORT_FAIL)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user