diff options
author | fiaxh <git@lightrise.org> | 2024-08-18 22:02:33 +0200 |
---|---|---|
committer | fiaxh <fiaxh@users.noreply.github.com> | 2024-08-19 11:36:17 +0200 |
commit | 88376cd6f75d5057caa6582d0a82fc76bb7b388f (patch) | |
tree | 72bf7aef70340bd47247d193180691108cb5c60d /main/src/view_model | |
parent | 8e7dedcaa62a49373c22dfc54bf1bb8b261bcb61 (diff) | |
download | dino-88376cd6f75d5057caa6582d0a82fc76bb7b388f.tar.gz dino-88376cd6f75d5057caa6582d0a82fc76bb7b388f.zip |
Conversation details: Make block button a stateful menu button
Diffstat (limited to 'main/src/view_model')
-rw-r--r-- | main/src/view_model/conversation_details.vala | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/main/src/view_model/conversation_details.vala b/main/src/view_model/conversation_details.vala index 9a34be78..75fc9669 100644 --- a/main/src/view_model/conversation_details.vala +++ b/main/src/view_model/conversation_details.vala @@ -6,15 +6,14 @@ using Gtk; public class Dino.Ui.ViewModel.ConversationDetails : Object { public signal void pin_changed(); - public signal void block_changed(BlockActions action); + public signal void block_changed(BlockState action); public signal void notification_flipped(); public signal void notification_changed(NotificationSetting setting); - public enum BlockActions { + public enum BlockState { USER, DOMAIN, - UNBLOCK, - TOGGLE + UNBLOCK } public enum NotificationOptions { @@ -38,8 +37,7 @@ public class Dino.Ui.ViewModel.ConversationDetails : Object { public bool notification_is_default { get; set; } public bool show_blocked { get; set; } - public bool blocked { get; set; } - public bool domain_blocked { get; set; } + public BlockState 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)); |