aboutsummaryrefslogtreecommitdiff
path: root/main/src/ui/contact_details
diff options
context:
space:
mode:
Diffstat (limited to 'main/src/ui/contact_details')
-rw-r--r--main/src/ui/contact_details/settings_provider.vala6
1 files changed, 6 insertions, 0 deletions
diff --git a/main/src/ui/contact_details/settings_provider.vala b/main/src/ui/contact_details/settings_provider.vala
index 140ebcab..6c43dbfd 100644
--- a/main/src/ui/contact_details/settings_provider.vala
+++ b/main/src/ui/contact_details/settings_provider.vala
@@ -49,6 +49,12 @@ public class SettingsProvider : Plugins.ContactDetailsProvider, Object {
combobox.active_id = get_notify_setting_id(conversation.notify_setting);
combobox.changed.connect(() => { conversation.notify_setting = get_notify_setting(combobox.active_id); } );
}
+
+ Switch pinned_switch = new Switch();
+ string category = conversation.type_ == Conversation.Type.GROUPCHAT ? DETAILS_HEADLINE_ROOM : DETAILS_HEADLINE_CHAT;
+ contact_details.add(category, _("Pin conversation"), _("Pins the conversation to the top of the conversation list"), pinned_switch);
+ pinned_switch.state = conversation.pinned != 0;
+ pinned_switch.state_set.connect((state) => { conversation.pinned = state ? 1 : 0; return false; });
}
private Conversation.Setting get_setting(string id) {