feat: open profile on name click

This commit is contained in:
Evangelos Paterakis 2022-11-17 22:35:01 +02:00
parent a207be3597
commit 4b41ac1c3f
No known key found for this signature in database
GPG key ID: FE5185F095BFC8C9
2 changed files with 3 additions and 3 deletions

View file

@ -19,7 +19,7 @@ public class Tooth.Widgets.RichLabelContainer : Adw.Bin {
widget.clicked.connect (on_click);
}
public void set_label (string text, string? url, Gee.HashMap<string, string>? emojis) {
public void set_label (string text, string? url, Gee.HashMap<string, string>? emojis, bool force_no_style = false) {
if (text.contains(":") && emojis != null) {
string[] labelss = text.split (":");
@ -80,7 +80,7 @@ public class Tooth.Widgets.RichLabelContainer : Adw.Bin {
// if there's no url
// make the button look
// like a label
if (url ==null) {
if (url ==null || force_no_style) {
widget.add_css_class("ttl-label-emoji-no-click");
}

View file

@ -138,7 +138,7 @@ public class Tooth.Widgets.Status : ListBoxRow {
status.formal.bind_property ("content", content, "content", BindingFlags.SYNC_CREATE);
// bind_property ("title_text", name_label, "label", BindingFlags.SYNC_CREATE);
// title_text
name_label.set_label(title_text, null, status.formal.account.emojis_map);
name_label.set_label(title_text, status.formal.account.handle, status.formal.account.emojis_map, true);
bind_property ("subtitle_text", handle_label, "label", BindingFlags.SYNC_CREATE);
bind_property ("date", date_label, "label", BindingFlags.SYNC_CREATE);
status.formal.bind_property ("pinned", pin_indicator, "visible", BindingFlags.SYNC_CREATE);