aboutsummaryrefslogtreecommitdiff
path: root/main/src/ui/global_search.vala
diff options
context:
space:
mode:
Diffstat (limited to 'main/src/ui/global_search.vala')
-rw-r--r--main/src/ui/global_search.vala12
1 files changed, 6 insertions, 6 deletions
diff --git a/main/src/ui/global_search.vala b/main/src/ui/global_search.vala
index d206220d..6872f631 100644
--- a/main/src/ui/global_search.vala
+++ b/main/src/ui/global_search.vala
@@ -116,15 +116,15 @@ public class GlobalSearch {
// Populate new suggestions
foreach(SearchSuggestion suggestion in suggestions) {
Builder builder = new Builder.from_resource("/im/dino/Dino/search_autocomplete.ui");
- AvatarImage avatar = (AvatarImage)builder.get_object("image");
+ AvatarPicture avatar = (AvatarPicture)builder.get_object("picture");
Label label = (Label)builder.get_object("label");
string display_name;
if (suggestion.conversation.type_ == Conversation.Type.GROUPCHAT && !suggestion.conversation.counterpart.equals(suggestion.jid) || suggestion.conversation.type_ == Conversation.Type.GROUPCHAT_PM) {
display_name = Util.get_participant_display_name(stream_interactor, suggestion.conversation, suggestion.jid);
- avatar.set_conversation_participant(stream_interactor, suggestion.conversation, suggestion.jid);
+ avatar.model = new ViewModel.CompatAvatarPictureModel(stream_interactor).add_participant(suggestion.conversation, suggestion.jid);
} else {
display_name = Util.get_conversation_display_name(stream_interactor, suggestion.conversation);
- avatar.set_conversation(stream_interactor, suggestion.conversation);
+ avatar.model = new ViewModel.CompatAvatarPictureModel(stream_interactor).set_conversation(suggestion.conversation);
}
if (display_name != suggestion.jid.to_string()) {
label.set_markup("%s <span font_weight='light' fgalpha='80%%'>%s</span>".printf(Markup.escape_text(display_name), Markup.escape_text(suggestion.jid.to_string())));
@@ -289,10 +289,10 @@ public class GlobalSearch {
}
private Grid get_skeleton(MessageItem item) {
- AvatarImage image = new AvatarImage() { height=32, width=32, margin_end=7, valign=Align.START, allow_gray = false };
- image.set_conversation_participant(stream_interactor, item.conversation, item.jid);
+ AvatarPicture picture = new AvatarPicture() { height_request=32, width_request=32, margin_end=7, valign=Align.START };
+ picture.model = new ViewModel.CompatAvatarPictureModel(stream_interactor).add_participant(item.conversation, item.jid);
Grid grid = new Grid() { row_homogeneous=false };
- grid.attach(image, 0, 0, 1, 2);
+ grid.attach(picture, 0, 0, 1, 2);
string display_name = Util.get_participant_display_name(stream_interactor, item.conversation, item.jid);
Label name_label = new Label(display_name) { ellipsize=EllipsizeMode.END, xalign=0 };