Removed ; and adjsuted to property syntax

This commit is contained in:
Dirkster99 2018-09-07 17:49:20 +02:00
parent a153427646
commit 6c1b1e2d70
2 changed files with 9 additions and 9 deletions

View File

@ -124,12 +124,12 @@ class VcfExporter {
}
if (contact.groups.size > 0) {
val groupList = Categories();
val groupList = Categories()
contact.groups.forEach {
groupList.getValues().add(it.title);
groupList.values.add(it.title)
}
card.setCategories(groupList);
card.categories = groupList
}
cards.add(card)

View File

@ -106,23 +106,23 @@ class VcfImporter(val activity: SimpleActivity) {
val groups = ArrayList<Group>()
if (ezContact.categories != null) {
val groupNames = ezContact.categories.getValues();
val groupNames = ezContact.categories.values
if (groupNames != null) {
val storedGroups = ContactsHelper(activity).getStoredGroups();
val storedGroups = ContactsHelper(activity).getStoredGroups()
groupNames.forEach {
val groupName = it;
val groupName = it
val storedGroup = storedGroups.firstOrNull { it.title == groupName }
if (storedGroup != null) {
groups.add(storedGroup);
groups.add(storedGroup)
}
else {
val newcontactGroup = activity.dbHelper.insertGroup(Group(0, groupName));
val newcontactGroup = activity.dbHelper.insertGroup(Group(0, groupName))
if (newcontactGroup != null)
groups.add(newcontactGroup);
groups.add(newcontactGroup)
}
}
}