From 8e7dedcaa62a49373c22dfc54bf1bb8b261bcb61 Mon Sep 17 00:00:00 2001 From: Miquel Lionel Date: Sun, 8 Oct 2023 17:45:16 +0200 Subject: Allow blocking entire domain from conversation details - the block domain option is in a drop down of the block button - when blocking the domain, the "Blocked domain" button appears and block button disappears and vice versa. --- main/src/view_model/conversation_details.vala | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (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 index 15bf7535..9a34be78 100644 --- a/main/src/view_model/conversation_details.vala +++ b/main/src/view_model/conversation_details.vala @@ -6,10 +6,17 @@ using Gtk; public class Dino.Ui.ViewModel.ConversationDetails : Object { public signal void pin_changed(); - public signal void block_changed(); + public signal void block_changed(BlockActions action); public signal void notification_flipped(); public signal void notification_changed(NotificationSetting setting); + public enum BlockActions { + USER, + DOMAIN, + UNBLOCK, + TOGGLE + } + public enum NotificationOptions { ON_OFF, ON_HIGHLIGHT_OFF @@ -32,6 +39,7 @@ public class Dino.Ui.ViewModel.ConversationDetails : Object { public bool show_blocked { get; set; } public bool blocked { get; set; } + public bool domain_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)); @@ -46,4 +54,5 @@ public class Dino.Ui.Model.ConversationDetails : Object { public DataForms.DataForm? data_form { get; set; } public string? data_form_bak; public bool blocked { get; set; } -} \ No newline at end of file + public bool domain_blocked { get; set; } +} -- cgit v1.2.3-70-g09d2