getRecentName function
String
getRecentName(
- RecentChatData item
)
Implementation
String getRecentName(RecentChatData item) {
if (MirrorflyUikit.instance.isTrialLicenceKey) {
/*return item.name.toString().checkNull().isEmpty
? item.nickName.toString()
: item.name.toString();*/
return item.profileName.checkNull().isEmpty
? item.nickName.checkNull()
: item.profileName.checkNull();
} else {
if (item.jid.checkNull() == SessionManagement.getUserJID()) {
return Constants.you;
} else if (item.isDeletedContact()) {
mirrorFlyLog('isDeletedContact', item.isDeletedContact().toString());
return Constants.deletedUser;
} else if (item.isUnknownContact() || item.nickName.checkNull().isEmpty) {
mirrorFlyLog('isUnknownContact', item.jid.toString());
return getMobileNumberFromJid(item.jid.checkNull());
} else {
mirrorFlyLog('nickName', item.nickName.toString());
return item.nickName.checkNull();
}
}
}