This commit is contained in:
admin
2026-06-11 11:05:19 +08:00
parent 0849d6c937
commit fb207d667e
2 changed files with 208 additions and 152 deletions

View File

@@ -107,6 +107,8 @@ class NextStep {
bool _j = false;
bool get j => _j;
Set<String> openWindows = {};
NextStep._();
static final NextStep I = NextStep._();
@@ -142,6 +144,7 @@ class NextStep {
if (rs is! Map<String, dynamic>) return;
_applyEventMap(rs['f']);
openWindows = _parseOpenWindowSchemes(rs['o']);
} catch (e) {
debugPrint("loadAppInfo error $e");
}
@@ -261,6 +264,19 @@ void _applyEventMap(dynamic value) {
}
}
Set<String> _parseOpenWindowSchemes(dynamic value) {
if (value is! List) return {};
return value
.map((item) => item?.toString().trim().toLowerCase() ?? '')
.map(
(item) =>
item.endsWith(':') ? item.substring(0, item.length - 1) : item,
)
.where((item) => item.isNotEmpty)
.toSet();
}
bool _isValidToken(String? token) {
return token != null && token.trim().length > 5;
}