diff options
author | fiaxh <git@mx.ax.lt> | 2017-03-20 22:12:20 +0100 |
---|---|---|
committer | fiaxh <git@mx.ax.lt> | 2017-03-20 22:28:32 +0100 |
commit | 6f3225979cb497db99381556adb7e42119b44ec3 (patch) | |
tree | 1f7352d12eaf1aec7a38d388d3b1917bcd06e479 /xmpp-vala/src | |
parent | db57a973534f099af2b150f1a1307d1948553d9f (diff) | |
download | dino-6f3225979cb497db99381556adb7e42119b44ec3.tar.gz dino-6f3225979cb497db99381556adb7e42119b44ec3.zip |
Select conversation on startup, placeholder for "No conversation selected", start services before UI
Diffstat (limited to 'xmpp-vala/src')
-rw-r--r-- | xmpp-vala/src/core/xmpp_stream.vala | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/xmpp-vala/src/core/xmpp_stream.vala b/xmpp-vala/src/core/xmpp_stream.vala index f3be115d..0283920b 100644 --- a/xmpp-vala/src/core/xmpp_stream.vala +++ b/xmpp-vala/src/core/xmpp_stream.vala @@ -237,8 +237,8 @@ public class FlagIdentity<T> : Object { this.id = id; } - public T? cast(XmppStreamFlag module) { - return (T?) module; + public T? cast(XmppStreamFlag flag) { + return flag.get_type().is_a(typeof(T)) ? (T?) flag : null; } public bool matches(XmppStreamFlag module) { @@ -246,7 +246,7 @@ public class FlagIdentity<T> : Object { } } -public abstract class XmppStreamFlag { +public abstract class XmppStreamFlag : Object { public abstract string get_ns(); public abstract string get_id(); } @@ -261,7 +261,7 @@ public class ModuleIdentity<T> : Object { } public T? cast(XmppStreamModule module) { - return (T?) module; + return module.get_type().is_a(typeof(T)) ? (T?) module : null; } public bool matches(XmppStreamModule module) { |