mirror of
				https://gitlab.com/famedly/fluffychat.git
				synced 2025-11-04 06:17:26 +01:00 
			
		
		
		
	Merge branch 'soru/hide-notif-content' into 'main'
feat: use the stripped body for notifications and room previews See merge request famedly/fluffychat!495
This commit is contained in:
		
						commit
						2f3fc1af92
					
				@ -595,12 +595,7 @@ class BackgroundPush {
 | 
			
		||||
    final title = l10n.unreadMessages(room.notificationCount);
 | 
			
		||||
 | 
			
		||||
    // Calculate the body
 | 
			
		||||
    final body = event?.getLocalizedBody(
 | 
			
		||||
          MatrixLocals(l10n),
 | 
			
		||||
          withSenderNamePrefix: true,
 | 
			
		||||
          hideReply: true,
 | 
			
		||||
        ) ??
 | 
			
		||||
        l10n.openAppToReadMessages;
 | 
			
		||||
    final body = event?.plaintextBody ?? l10n.openAppToReadMessages;
 | 
			
		||||
 | 
			
		||||
    // The person object for the android message style notification
 | 
			
		||||
    final avatar = room.avatar == null
 | 
			
		||||
 | 
			
		||||
@ -268,11 +268,7 @@ class ChatListItem extends StatelessWidget {
 | 
			
		||||
                : Text(
 | 
			
		||||
                    room.membership == Membership.invite
 | 
			
		||||
                        ? L10n.of(context).youAreInvitedToThisChat
 | 
			
		||||
                        : room.lastEvent?.getLocalizedBody(
 | 
			
		||||
                              MatrixLocals(L10n.of(context)),
 | 
			
		||||
                              hideReply: true,
 | 
			
		||||
                            ) ??
 | 
			
		||||
                            '',
 | 
			
		||||
                        : room.lastEvent?.plaintextBody,
 | 
			
		||||
                    softWrap: false,
 | 
			
		||||
                    maxLines: 1,
 | 
			
		||||
                    overflow: TextOverflow.ellipsis,
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user