TSAM-11717 Relationship field display wrong after setting any unknown contact 04/105304/1
authorEugene Kurzberg <i.kurtsberg@samsung.com>
Fri, 16 Dec 2016 07:55:06 +0000 (09:55 +0200)
committerEugene Kurzberg <i.kurtsberg@samsung.com>
Fri, 16 Dec 2016 07:55:06 +0000 (09:55 +0200)
Change-Id: I910d230699cbb85ebfbb9b4491ffdc5be57c0577
Signed-off-by: Eugene Kurzberg <i.kurtsberg@samsung.com>
lib-contacts/src/Contacts/Input/ContactRelationshipFieldItem.cpp

index 51f4c4e84119ee869c10140821f5ece1f127dc92..c8d378f59fd5ca0c8343ef5edf72e01e258fac02 100644 (file)
@@ -26,6 +26,8 @@
 #include "AppsCommonButtons.h"
 #include "InputItemLayout.h"
 
+#include <app_i18n.h>
+
 using namespace Contacts::Input;
 using namespace Contacts::Model;
 
@@ -70,7 +72,7 @@ void ContactRelationshipFieldItem::onPickResult(app_control_h request, app_contr
        contacts_db_get_record(_contacts_person._uri, personId, &record);
        contacts_record_get_str_p(record, _contacts_person.display_name, &name);
 
-       getField().cast<ContactTextField>().setValue(name);
+       getField().cast<ContactTextField>().setValue(name ? name : _("IDS_PB_HEADER_UNKNOWN"));
        static_cast<ContactTextFieldControl *>(getFieldControl())->update();
 
        contacts_record_destroy(record, true);