mirror of
https://github.com/SimpleMobileTools/Simple-Contacts.git
synced 2025-04-22 13:47:18 +02:00
Fix display of names if contact contains organization data (#743)
This commit is contained in:
parent
d21541f8a5
commit
3837ffedb1
@ -722,8 +722,14 @@ class ContactsHelper(val context: Context) {
|
|||||||
var middleName = ""
|
var middleName = ""
|
||||||
var surname = ""
|
var surname = ""
|
||||||
var suffix = ""
|
var suffix = ""
|
||||||
val mimetype = cursor.getStringValue(Data.MIMETYPE)
|
var mimetype = cursor.getStringValue(Data.MIMETYPE)
|
||||||
|
|
||||||
|
// if first line is an Organization type contact, go to next line
|
||||||
|
if (mimetype != StructuredName.CONTENT_ITEM_TYPE) {
|
||||||
|
if (cursor.moveToNext()) {
|
||||||
|
mimetype = cursor.getStringValue(Data.MIMETYPE)
|
||||||
|
}
|
||||||
|
}
|
||||||
// ignore names at Organization type contacts
|
// ignore names at Organization type contacts
|
||||||
if (mimetype == StructuredName.CONTENT_ITEM_TYPE) {
|
if (mimetype == StructuredName.CONTENT_ITEM_TYPE) {
|
||||||
prefix = cursor.getStringValue(StructuredName.PREFIX) ?: ""
|
prefix = cursor.getStringValue(StructuredName.PREFIX) ?: ""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user