fix: SystemType(#184) & opt.: ios home widget

This commit is contained in:
lollipopkit
2023-10-14 13:26:15 +08:00
parent 930697d033
commit 9a4a7cef4c
8 changed files with 150 additions and 68 deletions

View File

@@ -329,10 +329,10 @@ class ServerProvider extends ChangeNotifier {
}
final systemType = SystemType.parse(segments[0]);
if (systemType == null || !systemType.isSegmentsLenMatch(segments.length)) {
if (!systemType.isSegmentsLenMatch(segments.length)) {
_limiter.inc(sid);
s.status.failedInfo =
'Segments not match: expect ${systemType?.segmentsLen}, got ${segments.length}';
'Segments not match: expect ${systemType.segmentsLen}, got ${segments.length}';
_setServerState(s, ServerState.failed);
return;
}