Small improvement

This commit is contained in:
merkost 2023-07-14 13:22:20 +10:00
parent 9152671eed
commit ffd89252c7
1 changed files with 2 additions and 2 deletions

View File

@ -172,9 +172,9 @@ class MainActivity : SimpleActivity(), RefreshContactsListener {
override fun onActivityResult(requestCode: Int, resultCode: Int, resultData: Intent?) {
super.onActivityResult(requestCode, resultCode, resultData)
if (requestCode == PICK_IMPORT_SOURCE_INTENT && resultCode == Activity.RESULT_OK && resultData != null && resultData.data != null) {
if (requestCode == PICK_IMPORT_SOURCE_INTENT && resultCode == Activity.RESULT_OK && resultData?.data != null) {
tryImportContactsFromFile(resultData.data!!)
} else if (requestCode == PICK_EXPORT_FILE_INTENT && resultCode == Activity.RESULT_OK && resultData != null && resultData.data != null) {
} else if (requestCode == PICK_EXPORT_FILE_INTENT && resultCode == Activity.RESULT_OK && resultData?.data != null) {
try {
val outputStream = contentResolver.openOutputStream(resultData.data!!)
exportContactsTo(ignoredExportContactSources, outputStream)