mirror of
https://github.com/SimpleMobileTools/Simple-Contacts.git
synced 2025-06-05 21:59:27 +02:00
Removed ; and adjsuted to property syntax
This commit is contained in:
@ -124,12 +124,12 @@ class VcfExporter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (contact.groups.size > 0) {
|
if (contact.groups.size > 0) {
|
||||||
val groupList = Categories();
|
val groupList = Categories()
|
||||||
contact.groups.forEach {
|
contact.groups.forEach {
|
||||||
groupList.getValues().add(it.title);
|
groupList.values.add(it.title)
|
||||||
}
|
}
|
||||||
|
|
||||||
card.setCategories(groupList);
|
card.categories = groupList
|
||||||
}
|
}
|
||||||
|
|
||||||
cards.add(card)
|
cards.add(card)
|
||||||
|
@ -106,23 +106,23 @@ class VcfImporter(val activity: SimpleActivity) {
|
|||||||
val groups = ArrayList<Group>()
|
val groups = ArrayList<Group>()
|
||||||
|
|
||||||
if (ezContact.categories != null) {
|
if (ezContact.categories != null) {
|
||||||
val groupNames = ezContact.categories.getValues();
|
val groupNames = ezContact.categories.values
|
||||||
|
|
||||||
if (groupNames != null) {
|
if (groupNames != null) {
|
||||||
val storedGroups = ContactsHelper(activity).getStoredGroups();
|
val storedGroups = ContactsHelper(activity).getStoredGroups()
|
||||||
|
|
||||||
groupNames.forEach {
|
groupNames.forEach {
|
||||||
val groupName = it;
|
val groupName = it
|
||||||
val storedGroup = storedGroups.firstOrNull { it.title == groupName }
|
val storedGroup = storedGroups.firstOrNull { it.title == groupName }
|
||||||
|
|
||||||
if (storedGroup != null) {
|
if (storedGroup != null) {
|
||||||
groups.add(storedGroup);
|
groups.add(storedGroup)
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
val newcontactGroup = activity.dbHelper.insertGroup(Group(0, groupName));
|
val newcontactGroup = activity.dbHelper.insertGroup(Group(0, groupName))
|
||||||
|
|
||||||
if (newcontactGroup != null)
|
if (newcontactGroup != null)
|
||||||
groups.add(newcontactGroup);
|
groups.add(newcontactGroup)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user