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
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);
}
}

View File

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

View File

@ -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;

View File

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