mirror of
https://github.com/etesync/android
synced 2024-11-22 07:58:09 +00:00
Import: replace size check with isEmpty().
This commit is contained in:
parent
6381617f2c
commit
f4ce548310
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user