[geary/mjog/email-templates: 5/17] FolderList.FolderEntry: Emit `::entry_changed` on folder context change
- From: Michael Gratton <mjog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [geary/mjog/email-templates: 5/17] FolderList.FolderEntry: Emit `::entry_changed` on folder context change
- Date: Wed, 8 Apr 2020 09:22:53 +0000 (UTC)
commit 88efae737ae9f6d86e565bbd4fe0a5a3f2870161
Author: Michael Gratton <mike vee net>
Date: Thu Apr 2 14:45:32 2020 +1100
FolderList.FolderEntry: Emit `::entry_changed` on folder context change
This ensures any name, icon etc changes are picked up if anything
updates the same for the folder's context.
src/client/folder-list/folder-list-folder-entry.vala | 6 ++++++
1 file changed, 6 insertions(+)
---
diff --git a/src/client/folder-list/folder-list-folder-entry.vala
b/src/client/folder-list/folder-list-folder-entry.vala
index c69ef56c..ae78c1ff 100644
--- a/src/client/folder-list/folder-list-folder-entry.vala
+++ b/src/client/folder-list/folder-list-folder-entry.vala
@@ -18,12 +18,14 @@ public class FolderList.FolderEntry :
public FolderEntry(Application.FolderContext context) {
base(context.folder);
this.context = context;
+ this.context.notify.connect(on_context_changed);
this.has_new = false;
this.folder.properties.notify[Geary.FolderProperties.PROP_NAME_EMAIL_TOTAL].connect(on_counts_changed);
this.folder.properties.notify[Geary.FolderProperties.PROP_NAME_EMAIL_UNREAD].connect(on_counts_changed);
}
~FolderEntry() {
+ this.context.notify.disconnect(on_context_changed);
this.folder.properties.notify[Geary.FolderProperties.PROP_NAME_EMAIL_TOTAL].disconnect(on_counts_changed);
this.folder.properties.notify[Geary.FolderProperties.PROP_NAME_EMAIL_UNREAD].disconnect(on_counts_changed);
}
@@ -111,4 +113,8 @@ public class FolderList.FolderEntry :
entry_changed();
}
+ private void on_context_changed() {
+ entry_changed();
+ }
+
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]