Multibyte: fix map

This commit is contained in:
HDDen
2026-05-28 02:20:56 +03:00
parent 6e81fdfd46
commit 2e4f26d7cd
8 changed files with 338 additions and 267 deletions
+3 -3
View File
@@ -28,8 +28,8 @@ class NotificationService {
AppLocalizations get _l10n => lookupAppLocalizations(_locale);
String _logSafe(String value) {
final sanitized = value.replaceAll(RegExp(r'[\x00-\x1F\x7F]'), ' ');
return Uri.encodeComponent(sanitized);
final sanitized = value.replaceAll(RegExp(r'[\x00-\x1F\x7F]'), ' ');
return Uri.encodeComponent(sanitized);
}
// Rate limiting to prevent notification storms
@@ -577,7 +577,7 @@ class NotificationService {
// Show first few device names in batch summary for debugging (only if adverts exist)
final deviceInfo = adverts.isNotEmpty
? ' (${adverts.take(5).map((n) => _logSafe(n.body)).join(', ')}${adverts.length > 5 ? ', ...' : ''})'
? ' (${adverts.take(5).map((n) => _logSafe(n.body)).join(', ')}${adverts.length > 5 ? ', ...' : ''})'
: '';
debugPrint('[Notification] batch summary: ${parts.join(", ")}$deviceInfo');