Fix topic displaying issues

fixes #393
This commit is contained in:
fiaxh 2019-03-01 18:20:08 +01:00
parent 3880e41497
commit df6328dfcb
2 changed files with 4 additions and 3 deletions

View file

@ -28,10 +28,11 @@ public class UnifiedWindow : Gtk.Window {
return Util.use_csd() ? conversation_titlebar_csd.subtitle : conversation_titlebar.subtitle;
}
set {
string? new_subtitle = value == null ? null : (new Regex("\\s+")).replace_literal(value, -1, 0, " ");
if (Util.use_csd()) {
conversation_titlebar_csd.subtitle = value;
conversation_titlebar_csd.subtitle = new_subtitle;
} else {
conversation_titlebar.subtitle = value;
conversation_titlebar.subtitle = new_subtitle;
}
}
}

View file

@ -147,7 +147,7 @@ public class UnifiedWindowController : Object {
}
private void update_conversation_topic(string? subtitle = null) {
if (conversation_topic != null) {
if (subtitle != null) {
conversation_topic = subtitle;
} else if (conversation.type_ == Conversation.Type.GROUPCHAT) {
string subject = stream_interactor.get_module(MucManager.IDENTITY).get_groupchat_subject(conversation.counterpart, conversation.account);