fix(style): Style fixes

This commit is contained in:
PapaTutuWawa 2023-05-07 00:15:37 +02:00
parent f3d906e69b
commit 09b8613c80
4 changed files with 18 additions and 9 deletions

View File

@ -703,7 +703,7 @@ class XmppConnection {
// Process nonzas separately // Process nonzas separately
if (!['message', 'iq', 'presence'].contains(nonza.tag)) { if (!['message', 'iq', 'presence'].contains(nonza.tag)) {
_log.finest('<== ${nonza.toXml()}'); _log.finest('<== ${nonza.toXml()}');
var nonzaHandled = false; var nonzaHandled = false;
await Future.forEach(_xmppManagers.values, await Future.forEach(_xmppManagers.values,
(XmppManagerBase manager) async { (XmppManagerBase manager) async {
@ -750,7 +750,9 @@ class XmppConnection {
), ),
); );
if (!incomingHandlers.done) { 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); await handleUnhandledStanza(this, incomingPreHandlers);
} }
} }

View File

@ -56,7 +56,7 @@ abstract class NegotiationsHandler {
@protected @protected
late final ResetStreamParserFunction resetStreamParser; late final ResetStreamParserFunction resetStreamParser;
/// The id included in the last stream header. /// The id included in the last stream header.
@protected @protected
String? streamId; String? streamId;

View File

@ -58,7 +58,7 @@ class StanzaHandler extends Handler {
this.stanzaTag, this.stanzaTag,
this.xmlns, this.xmlns,
}); });
/// If specified, then the stanza must contain a direct child with a tag equal to /// If specified, then the stanza must contain a direct child with a tag equal to
/// [tagName]. /// [tagName].
final String? tagName; final String? tagName;

View File

@ -71,9 +71,13 @@ class XMPPStreamParser extends StreamTransformerBase<String, XMPPStreamObject> {
/// The selectors. /// The selectors.
_ChunkedConversionBuffer<List<XmlEvent>, XmlEvent> _childSelector = _ChunkedConversionBuffer<List<XmlEvent>, XmlEvent> _childSelector =
_ChunkedConversionBuffer<List<XmlEvent>, XmlEvent>(XmlSubtreeSelector((event) => event.qualifiedName != 'stream:stream')); _ChunkedConversionBuffer<List<XmlEvent>, XmlEvent>(
XmlSubtreeSelector((event) => event.qualifiedName != 'stream:stream'),
);
_ChunkedConversionBuffer<List<XmlEvent>, XmlEvent> _streamHeaderSelector = _ChunkedConversionBuffer<List<XmlEvent>, XmlEvent> _streamHeaderSelector =
_ChunkedConversionBuffer<List<XmlEvent>, XmlEvent>(XmlSubtreeSelector((event) => event.qualifiedName == 'stream:stream')); _ChunkedConversionBuffer<List<XmlEvent>, XmlEvent>(
XmlSubtreeSelector((event) => event.qualifiedName == 'stream:stream'),
);
void reset() { void reset() {
try { try {
@ -104,9 +108,12 @@ class XMPPStreamParser extends StreamTransformerBase<String, XMPPStreamObject> {
_childBuffer = _ChunkedConversionBuffer<List<XmlEvent>, XmlNode>( _childBuffer = _ChunkedConversionBuffer<List<XmlEvent>, XmlNode>(
const XmlNodeDecoder(), const XmlNodeDecoder(),
); );
_childSelector = _ChunkedConversionBuffer<List<XmlEvent>, XmlEvent>(XmlSubtreeSelector((event) => event.qualifiedName != 'stream:stream')); _childSelector = _ChunkedConversionBuffer<List<XmlEvent>, XmlEvent>(
_streamHeaderSelector = XmlSubtreeSelector((event) => event.qualifiedName != 'stream:stream'),
_ChunkedConversionBuffer<List<XmlEvent>, XmlEvent>(XmlSubtreeSelector((event) => event.qualifiedName == 'stream:stream')); );
_streamHeaderSelector = _ChunkedConversionBuffer<List<XmlEvent>, XmlEvent>(
XmlSubtreeSelector((event) => event.qualifiedName == 'stream:stream'),
);
} }
@override @override