Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added data/gschemas.compiled
Binary file not shown.
11 changes: 10 additions & 1 deletion data/io.elementary.mail.gschema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,16 @@
<summary>Whether to always load remote images without prompting</summary>
<description>Whether to always load remote images without prompting</description>
</key>
<key name="hide-read-conversations" type="b">
<default>false</default>
<summary>Whether to hide read conversations in the list</summary>
<description>Stores the last used state of the “Hide read conversations” filter</description>
</key>
<key name="hide-unstarred-conversations" type="b">
<default>false</default>
<summary>Whether to hide unstarred conversations in the list</summary>
<description>Stores the last used state of the “Hide unstarred conversations” filter</description>
</key>
<key name="remote-images-whitelist" type="as">
<default>[]</default>
<summary>A list of sender addresses for which remote images will be automatically loaded</summary>
Expand All @@ -51,4 +61,3 @@
</key>
</schema>
</schemalist>

8 changes: 5 additions & 3 deletions src/ConversationList/ConversationList.vala
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ public class Mail.ConversationList : Gtk.Box {
};

hide_read_switch = new Granite.SwitchModelButton (_("Hide read conversations"));

hide_unstarred_switch = new Granite.SwitchModelButton (_("Hide unstarred conversations"));

var filter_menu_popover_box = new Gtk.Box (VERTICAL, 0) {
Expand Down Expand Up @@ -203,8 +202,11 @@ public class Mail.ConversationList : Gtk.Box {
}
});

hide_read_switch.toggled.connect (() => load_folder.begin (folder_info_per_account));
var settings = new GLib.Settings ("io.elementary.mail");
settings.bind ("hide-read-conversations", hide_read_switch, "active", DEFAULT);
settings.bind ("hide-unstarred-conversations", hide_unstarred_switch, "active", DEFAULT);

hide_read_switch.toggled.connect (() => load_folder.begin (folder_info_per_account));
hide_unstarred_switch.toggled.connect (() => load_folder.begin (folder_info_per_account));
}

Expand All @@ -222,7 +224,7 @@ public class Mail.ConversationList : Gtk.Box {
}
}

public async void load_folder (Gee.Map<Backend.Account, Camel.FolderInfo?> folder_info_per_account) {
public async void load_folder (Gee.Map<Backend.Account, Camel.FolderInfo?> folder_info_per_account) requires (folder_info_per_account != null) {
lock (this.folder_info_per_account) {
this.folder_info_per_account = folder_info_per_account;
}
Expand Down