Commit 060f4318 authored by Sébastien Blin's avatar Sébastien Blin Committed by Hugo Lefeuvre

conversationsview: homogenize temporary item between Gnome and MacOSX

When querying a name in the search bar, we should see:
"Searching..." or "Not found" and the registered name below. Or,
actually, the registered name is not shown for the temporary item.
So, fix patch update the renderer to reflect that.

Change-Id: Idc0061300024820af7fed9fe9eaa45748bf03d0a
Reviewed-by: default avatarHugo Lefeuvre <hugo.lefeuvre@savoirfairelinux.com>
parent 2722ab96
......@@ -158,22 +158,21 @@ render_name_and_last_interaction(G_GNUC_UNUSED GtkTreeViewColumn *tree_column,
bestId
);
} else if (std::string(alias).empty()) {
// For conversations with contacts with no alias
// If no alias to show, use the best id
text = g_markup_printf_escaped(
"<span font_weight=\"bold\">%s</span>\n<span size=\"smaller\" color=\"#666\">%s</span>",
bestId,
lastInteraction
);
} else if (std::string(alias) == std::string(bestId)
|| std::string(bestId).empty() || std::string(uid).empty()) {
// For temporary item
} else if (std::string(alias) == std::string(bestId)) {
// If the alias and the best id are identical, show only the alias
text = g_markup_printf_escaped(
"<span font_weight=\"bold\">%s</span>\n<span size=\"smaller\" color=\"#666\">%s</span>",
alias,
lastInteraction
);
} else {
// For conversations with contacts with alias
// If the alias is not empty and not equals to the best id, show both the alias and the best id
text = g_markup_printf_escaped(
"<span font_weight=\"bold\">%s</span>\n<span size=\"smaller\" color=\"#666\">%s</span>\n<span size=\"smaller\" color=\"#666\">%s</span>",
alias,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment