aboutsummaryrefslogtreecommitdiff
path: root/xmpp-vala/src/core
diff options
context:
space:
mode:
authorMiquel Lionel <lionel@les-miquelots.net>2023-10-30 21:48:08 +0100
committerMiquel Lionel <lionel@les-miquelots.net>2023-10-30 21:48:08 +0100
commitd761e8ccd5293d2f30a889b0cbe302c985aee68c (patch)
tree922bb248a7fee4cdff3da114abc7d77200f3d0da /xmpp-vala/src/core
parent302e954c99c71d670201828c6746dfaa40276d6d (diff)
parent3de716446819550514d50a8112f5b6dd0c662702 (diff)
downloaddino-add_conversation_account_indicator.tar.gz
dino-add_conversation_account_indicator.zip
Show which account is currently used in conversation details in the about sectionadd_conversation_account_indicator
Diffstat (limited to 'xmpp-vala/src/core')
-rw-r--r--xmpp-vala/src/core/module_flag.vala10
-rw-r--r--xmpp-vala/src/core/xmpp_stream.vala4
2 files changed, 12 insertions, 2 deletions
diff --git a/xmpp-vala/src/core/module_flag.vala b/xmpp-vala/src/core/module_flag.vala
index 95547852..76ae4dc1 100644
--- a/xmpp-vala/src/core/module_flag.vala
+++ b/xmpp-vala/src/core/module_flag.vala
@@ -10,7 +10,12 @@ namespace Xmpp {
}
public T? cast(XmppStreamFlag flag) {
+#if VALA_0_56_11
+ // We can't typecheck due to compiler bug
+ return (T) module;
+#else
return flag.get_type().is_a(typeof(T)) ? (T?) flag : null;
+#endif
}
public bool matches(XmppStreamFlag module) {
@@ -34,7 +39,12 @@ namespace Xmpp {
}
public T? cast(XmppStreamModule module) {
+#if VALA_0_56_11
+ // We can't typecheck due to compiler bug
+ return (T) module;
+#else
return module.get_type().is_a(typeof(T)) ? (T?) module : null;
+#endif
}
public bool matches(XmppStreamModule module) {
diff --git a/xmpp-vala/src/core/xmpp_stream.vala b/xmpp-vala/src/core/xmpp_stream.vala
index 42e90bf9..54433b67 100644
--- a/xmpp-vala/src/core/xmpp_stream.vala
+++ b/xmpp-vala/src/core/xmpp_stream.vala
@@ -30,9 +30,9 @@ public abstract class Xmpp.XmppStream : Object {
this.remote_name = remote_name;
}
- public abstract async void connect() throws IOError;
+ public abstract new async void connect() throws IOError;
- public abstract async void disconnect() throws IOError;
+ public abstract new async void disconnect() throws IOError;
public abstract async StanzaNode read() throws IOError;