From e2c34bf2235c9f85fc91de9c0f1b74858f4ef89e Mon Sep 17 00:00:00 2001 From: fiaxh Date: Sun, 24 Sep 2023 19:54:04 +0200 Subject: Rewrite contact details dialog --- main/src/view_model/conversation_details.vala | 49 +++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 main/src/view_model/conversation_details.vala (limited to 'main/src/view_model/conversation_details.vala') diff --git a/main/src/view_model/conversation_details.vala b/main/src/view_model/conversation_details.vala new file mode 100644 index 00000000..15bf7535 --- /dev/null +++ b/main/src/view_model/conversation_details.vala @@ -0,0 +1,49 @@ +using Dino.Entities; +using Xmpp; +using Xmpp.Xep; +using Gee; +using Gtk; + +public class Dino.Ui.ViewModel.ConversationDetails : Object { + public signal void pin_changed(); + public signal void block_changed(); + public signal void notification_flipped(); + public signal void notification_changed(NotificationSetting setting); + + public enum NotificationOptions { + ON_OFF, + ON_HIGHLIGHT_OFF + } + + public enum NotificationSetting { + DEFAULT, + ON, + HIGHLIGHT, + OFF + } + + public ViewModel.CompatAvatarPictureModel avatar { get; set; } + public string name { get; set; } + public bool pinned { get; set; } + + public NotificationSetting notification { get; set; } + public NotificationOptions notification_options { get; set; } + public bool notification_is_default { get; set; } + + public bool show_blocked { get; set; } + public bool blocked { get; set; } + + public GLib.ListStore preferences_rows = new GLib.ListStore(typeof(PreferencesRow.Any)); + public GLib.ListStore about_rows = new GLib.ListStore(typeof(PreferencesRow.Any)); + public GLib.ListStore encryption_rows = new GLib.ListStore(typeof(PreferencesRow.Any)); + public GLib.ListStore settings_rows = new GLib.ListStore(typeof(PreferencesRow.Any)); + public GLib.ListStore room_configuration_rows { get; set; } +} + +public class Dino.Ui.Model.ConversationDetails : Object { + public Conversation conversation { get; set; } + public Dino.Model.ConversationDisplayName display_name { get; set; } + public DataForms.DataForm? data_form { get; set; } + public string? data_form_bak; + public bool blocked { get; set; } +} \ No newline at end of file -- cgit v1.2.3-54-g00ecf