removed truncation of notification as in Issue #107

This commit is contained in:
ericz 2026-01-25 11:40:02 +01:00
parent 88aa104ae5
commit bb18038f60

View file

@ -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) {