mirror of
https://github.com/TakeV-Lambda/Tooth.git
synced 2024-10-31 21:20:24 +00:00
feat: open profile on name click
This commit is contained in:
parent
a207be3597
commit
4b41ac1c3f
2 changed files with 3 additions and 3 deletions
|
@ -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");
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue