diff --git a/app/src/main/java/com/etesync/syncadapter/ui/importlocal/ImportFragment.kt b/app/src/main/java/com/etesync/syncadapter/ui/importlocal/ImportFragment.kt index 73b8bfa2..072d3099 100644 --- a/app/src/main/java/com/etesync/syncadapter/ui/importlocal/ImportFragment.kt +++ b/app/src/main/java/com/etesync/syncadapter/ui/importlocal/ImportFragment.kt @@ -220,7 +220,7 @@ class ImportFragment : DialogFragment() { val events = Event.fromReader(importReader, null) importReader.close() - if (events.size == 0) { + if (events.isEmpty()) { Logger.log.warning("Empty/invalid file.") result.e = Exception("Empty/invalid file.") return result @@ -263,7 +263,7 @@ class ImportFragment : DialogFragment() { val downloader = ContactsSyncManager.ResourceDownloader(context) val contacts = Contact.fromReader(importReader, downloader) - if (contacts.size == 0) { + if (contacts.isEmpty()) { Logger.log.warning("Empty/invalid file.") result.e = Exception("Empty/invalid file.") return result