diff options
author | Marvin W <git@larma.de> | 2018-11-10 08:05:14 -0600 |
---|---|---|
committer | Marvin W <git@larma.de> | 2018-11-10 08:05:14 -0600 |
commit | dfb75e2cda1eb9edbbdd9ea88c131d9cb31742ed (patch) | |
tree | d3c1ae4251844239eb46e57c8eacf03466aed608 /libdino/src/plugin/registry.vala | |
parent | 559bbc5ca3ad5d44ea949788005a29fe9d86a232 (diff) | |
parent | 65a12021bc7abbf5ddea068ffe9b4715cfc34f0b (diff) | |
download | dino-dfb75e2cda1eb9edbbdd9ea88c131d9cb31742ed.tar.gz dino-dfb75e2cda1eb9edbbdd9ea88c131d9cb31742ed.zip |
Merge PR #413 "Improvements to the OMEMO plugin"
Diffstat (limited to 'libdino/src/plugin/registry.vala')
-rw-r--r-- | libdino/src/plugin/registry.vala | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libdino/src/plugin/registry.vala b/libdino/src/plugin/registry.vala index 2b496288..9c211a6d 100644 --- a/libdino/src/plugin/registry.vala +++ b/libdino/src/plugin/registry.vala @@ -8,6 +8,7 @@ public class Registry { internal ArrayList<ContactDetailsProvider> contact_details_entries = new ArrayList<ContactDetailsProvider>(); internal Map<string, TextCommand> text_commands = new HashMap<string, TextCommand>(); internal Gee.List<ConversationAdditionPopulator> conversation_addition_populators = new ArrayList<ConversationAdditionPopulator>(); + internal Gee.List<NotificationPopulator> notification_populators = new ArrayList<NotificationPopulator>(); internal Gee.Collection<ConversationTitlebarEntry> conversation_titlebar_entries = new Gee.TreeSet<ConversationTitlebarEntry>((a, b) => { if (a.order < b.order) { return -1; @@ -78,6 +79,16 @@ public class Registry { return true; } } + + public bool register_notification_populator(NotificationPopulator populator) { + lock (notification_populators) { + foreach(NotificationPopulator p in notification_populators) { + if (p.id == populator.id) return false; + } + notification_populators.add(populator); + return true; + } + } } } |