mirror of
https://github.com/zjs81/meshcore-open.git
synced 2026-04-20 22:13:48 +00:00
removed truncation of notification as in Issue #107
This commit is contained in:
parent
88aa104ae5
commit
bb18038f60
1 changed files with 2 additions and 8 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue