fix: handle ID copying separately and remove whitelist logs

Signed-off-by: 21pages <sunboeasy@gmail.com>
This commit is contained in:
21pages
2026-07-26 20:08:22 +08:00
parent 003b9d507a
commit ce3ed5f93a
3 changed files with 10 additions and 6 deletions

View File

@@ -352,9 +352,6 @@ void changeIdWhiteList({Function()? callback}) async {
msg = "";
isInProgress = true;
});
debugPrint(
'[id-whitelist] raw=${controller.text.replaceAll(' ', '').replaceAll('\n', r'\n')}',
);
newIdWhiteListField = controller.text.trim();
var newIdWhiteList = "";
if (newIdWhiteListField.isEmpty) {
@@ -365,7 +362,6 @@ void changeIdWhiteList({Function()? callback}) async {
.split(RegExp(r"[\s,;\n]+"))
.where((e) => e.isNotEmpty)
.toList();
debugPrint('[id-whitelist] ids=$ids');
// test id, wildcards '*' and '?' are allowed;
// '@' '.' ':' '/' '[' ']' occur in cross-server IDs and WebSocket URIs
final idMatch = RegExp(r"^[a-zA-Z0-9_*?@.:/\[\]-]+$");
@@ -383,7 +379,6 @@ void changeIdWhiteList({Function()? callback}) async {
if (newIdWhiteList.trim().isEmpty) {
newIdWhiteList = defaultOptionWhitelist;
}
debugPrint('[id-whitelist] normalized=$newIdWhiteList');
await bind.mainSetOption(
key: kOptionIdWhitelist, value: newIdWhiteList);
callback?.call();