aboutsummaryrefslogtreecommitdiff
path: root/main/src/view_model/conversation_details.vala
blob: 75fc96691dc054c26f6242c2d7a9677a32db43ae (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
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(BlockState action);
    public signal void notification_flipped();
    public signal void notification_changed(NotificationSetting setting);

    public enum BlockState {
        USER,
        DOMAIN,
        UNBLOCK
    }

    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 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));
    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; }
    public bool domain_blocked { get; set; }
}