aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreerielili <lionel@les-miquelots.net>2024-01-13 13:27:30 +0000
committerGitHub <noreply@github.com>2024-01-13 14:27:30 +0100
commit7e3cedaf3fa347bfa688e71b0f69e62725db395d (patch)
tree698bd6bcdd7318b84b4c529b19db613684b6185a
parent732d3a9814b383aa8f2c962d33c7feb0481ff7a7 (diff)
downloaddino-7e3cedaf3fa347bfa688e71b0f69e62725db395d.tar.gz
dino-7e3cedaf3fa347bfa688e71b0f69e62725db395d.zip
Enable hyperlinks in topic text to be clicked (#1523)
fixes #1042
-rw-r--r--main/src/ui/conversation_titlebar/conversation_titlebar.vala2
-rw-r--r--main/src/ui/conversation_view_controller.vala6
2 files changed, 5 insertions, 3 deletions
diff --git a/main/src/ui/conversation_titlebar/conversation_titlebar.vala b/main/src/ui/conversation_titlebar/conversation_titlebar.vala
index ba0dcfa3..980d8d72 100644
--- a/main/src/ui/conversation_titlebar/conversation_titlebar.vala
+++ b/main/src/ui/conversation_titlebar/conversation_titlebar.vala
@@ -90,7 +90,7 @@ public class ConversationTitlebarCsd : ConversationTitlebar, Object {
public Adw.HeaderBar header_bar = new Adw.HeaderBar();
private Label title_label = new Label("") { ellipsize=EllipsizeMode.END };
- private Label subtitle_label = new Label("") { ellipsize=EllipsizeMode.END, visible=false };
+ private Label subtitle_label = new Label("") { use_markup=true, ellipsize=EllipsizeMode.END, visible=false };
private Revealer back_revealer;
public ConversationTitlebarCsd() {
diff --git a/main/src/ui/conversation_view_controller.vala b/main/src/ui/conversation_view_controller.vala
index da94b740..5b768271 100644
--- a/main/src/ui/conversation_view_controller.vala
+++ b/main/src/ui/conversation_view_controller.vala
@@ -177,11 +177,13 @@ public class ConversationViewController : Object {
private void update_conversation_topic(string? subtitle = null) {
if (subtitle != null) {
- conversation_topic = Util.summarize_whitespaces_to_space(subtitle);
+ string summarized_topic = Util.summarize_whitespaces_to_space(subtitle);
+ conversation_topic = Util.parse_add_markup(summarized_topic, null, true, true);
} else if (conversation.type_ == Conversation.Type.GROUPCHAT) {
string? subject = stream_interactor.get_module(MucManager.IDENTITY).get_groupchat_subject(conversation.counterpart, conversation.account);
if (subject != null) {
- conversation_topic = Util.summarize_whitespaces_to_space(subject);
+ string summarized_topic = Util.summarize_whitespaces_to_space(subject);
+ conversation_topic = Util.parse_add_markup(summarized_topic, null, true, true);
} else {
conversation_topic = null;
}