From bb18038f603374399f739c2fff8201811d1e0400 Mon Sep 17 00:00:00 2001 From: ericz Date: Sun, 25 Jan 2026 11:40:02 +0100 Subject: [PATCH] removed truncation of notification as in Issue #107 --- lib/services/notification_service.dart | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/lib/services/notification_service.dart b/lib/services/notification_service.dart index cefeb2a..1d25f92 100644 --- a/lib/services/notification_service.dart +++ b/lib/services/notification_service.dart @@ -112,7 +112,7 @@ class NotificationService { await _notifications.show( contactId?.hashCode ?? 0, 'New message from $contactName', - message.length > 100 ? '${message.substring(0, 100)}...' : message, + message, notificationDetails, payload: 'message:$contactId', ); @@ -203,7 +203,7 @@ class NotificationService { macOS: macDetails, ); - final preview = _truncateMessage(message, 30); + final preview = message.trim(); final body = preview.isEmpty ? 'Received new message' : preview; @@ -217,12 +217,6 @@ class NotificationService { ); } - String _truncateMessage(String message, int maxLength) { - final trimmed = message.trim(); - if (trimmed.length <= maxLength) return trimmed; - return '${trimmed.substring(0, maxLength)}...'; - } - void _onNotificationTapped(NotificationResponse response) { final payload = response.payload; if (payload != null) {