diff options
author | fiaxh <git@mx.ax.lt> | 2017-03-19 12:55:36 +0100 |
---|---|---|
committer | fiaxh <git@mx.ax.lt> | 2017-03-20 22:28:27 +0100 |
commit | db57a973534f099af2b150f1a1307d1948553d9f (patch) | |
tree | 238ae1d4e53412a33e3febd07318dfd38b0eb2f8 /main/src/ui/util.vala | |
parent | 233f2b35d033cd20d1ac648bf2d723bcb7a918fc (diff) | |
download | dino-db57a973534f099af2b150f1a1307d1948553d9f.tar.gz dino-db57a973534f099af2b150f1a1307d1948553d9f.zip |
Add typed identity to manager modules and stream flags
Diffstat (limited to 'main/src/ui/util.vala')
-rw-r--r-- | main/src/ui/util.vala | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/main/src/ui/util.vala b/main/src/ui/util.vala index 2cf070b0..810ab13d 100644 --- a/main/src/ui/util.vala +++ b/main/src/ui/util.vala @@ -44,7 +44,7 @@ public class Util : Object { } public static string get_display_name(StreamInteractor stream_interactor, Jid jid, Account account) { - if (MucManager.get_instance(stream_interactor).is_groupchat_occupant(jid, account)) { + if (stream_interactor.get_module(MucManager.IDENTITY).is_groupchat_occupant(jid, account)) { return jid.resourcepart; } else { if (jid.bare_jid.equals(account.bare_jid.bare_jid)) { @@ -54,7 +54,7 @@ public class Util : Object { return account.alias; } } - Roster.Item roster_item = RosterManager.get_instance(stream_interactor).get_roster_item(account, jid); + Roster.Item roster_item = stream_interactor.get_module(RosterManager.IDENTITY).get_roster_item(account, jid); if (roster_item != null && roster_item.name != null) { return roster_item.name; } @@ -63,7 +63,7 @@ public class Util : Object { } public static string get_message_display_name(StreamInteractor stream_interactor, Entities.Message message, Account account) { - Jid? real_jid = MucManager.get_instance(stream_interactor).get_message_real_jid(message); + Jid? real_jid = stream_interactor.get_module(MucManager.IDENTITY).get_message_real_jid(message); if (real_jid != null) { return get_display_name(stream_interactor, real_jid, account); } else { |