From 09b8613c803ea0887043ee6df91f9731cc01ca31 Mon Sep 17 00:00:00 2001 From: "Alexander \"PapaTutuWawa" Date: Sun, 7 May 2023 00:15:37 +0200 Subject: [PATCH] fix(style): Style fixes --- packages/moxxmpp/lib/src/connection.dart | 6 ++++-- packages/moxxmpp/lib/src/handlers/base.dart | 2 +- packages/moxxmpp/lib/src/managers/handlers.dart | 2 +- packages/moxxmpp/lib/src/parser.dart | 17 ++++++++++++----- 4 files changed, 18 insertions(+), 9 deletions(-) diff --git a/packages/moxxmpp/lib/src/connection.dart b/packages/moxxmpp/lib/src/connection.dart index 52d7cf7..03899ed 100644 --- a/packages/moxxmpp/lib/src/connection.dart +++ b/packages/moxxmpp/lib/src/connection.dart @@ -703,7 +703,7 @@ class XmppConnection { // Process nonzas separately if (!['message', 'iq', 'presence'].contains(nonza.tag)) { _log.finest('<== ${nonza.toXml()}'); - + var nonzaHandled = false; await Future.forEach(_xmppManagers.values, (XmppManagerBase manager) async { @@ -750,7 +750,9 @@ class XmppConnection { ), ); if (!incomingHandlers.done) { - _log.warning('Returning error for unhandled stanza ${incomingPreHandlers.stanza.tag}'); + _log.warning( + 'Returning error for unhandled stanza ${incomingPreHandlers.stanza.tag}', + ); await handleUnhandledStanza(this, incomingPreHandlers); } } diff --git a/packages/moxxmpp/lib/src/handlers/base.dart b/packages/moxxmpp/lib/src/handlers/base.dart index 5bec690..caf93f4 100644 --- a/packages/moxxmpp/lib/src/handlers/base.dart +++ b/packages/moxxmpp/lib/src/handlers/base.dart @@ -56,7 +56,7 @@ abstract class NegotiationsHandler { @protected late final ResetStreamParserFunction resetStreamParser; - + /// The id included in the last stream header. @protected String? streamId; diff --git a/packages/moxxmpp/lib/src/managers/handlers.dart b/packages/moxxmpp/lib/src/managers/handlers.dart index d360fde..f35a849 100644 --- a/packages/moxxmpp/lib/src/managers/handlers.dart +++ b/packages/moxxmpp/lib/src/managers/handlers.dart @@ -58,7 +58,7 @@ class StanzaHandler extends Handler { this.stanzaTag, this.xmlns, }); - + /// If specified, then the stanza must contain a direct child with a tag equal to /// [tagName]. final String? tagName; diff --git a/packages/moxxmpp/lib/src/parser.dart b/packages/moxxmpp/lib/src/parser.dart index c5738cd..1c9b458 100644 --- a/packages/moxxmpp/lib/src/parser.dart +++ b/packages/moxxmpp/lib/src/parser.dart @@ -71,9 +71,13 @@ class XMPPStreamParser extends StreamTransformerBase { /// The selectors. _ChunkedConversionBuffer, XmlEvent> _childSelector = - _ChunkedConversionBuffer, XmlEvent>(XmlSubtreeSelector((event) => event.qualifiedName != 'stream:stream')); + _ChunkedConversionBuffer, XmlEvent>( + XmlSubtreeSelector((event) => event.qualifiedName != 'stream:stream'), + ); _ChunkedConversionBuffer, XmlEvent> _streamHeaderSelector = - _ChunkedConversionBuffer, XmlEvent>(XmlSubtreeSelector((event) => event.qualifiedName == 'stream:stream')); + _ChunkedConversionBuffer, XmlEvent>( + XmlSubtreeSelector((event) => event.qualifiedName == 'stream:stream'), + ); void reset() { try { @@ -104,9 +108,12 @@ class XMPPStreamParser extends StreamTransformerBase { _childBuffer = _ChunkedConversionBuffer, XmlNode>( const XmlNodeDecoder(), ); - _childSelector = _ChunkedConversionBuffer, XmlEvent>(XmlSubtreeSelector((event) => event.qualifiedName != 'stream:stream')); - _streamHeaderSelector = - _ChunkedConversionBuffer, XmlEvent>(XmlSubtreeSelector((event) => event.qualifiedName == 'stream:stream')); + _childSelector = _ChunkedConversionBuffer, XmlEvent>( + XmlSubtreeSelector((event) => event.qualifiedName != 'stream:stream'), + ); + _streamHeaderSelector = _ChunkedConversionBuffer, XmlEvent>( + XmlSubtreeSelector((event) => event.qualifiedName == 'stream:stream'), + ); } @override