Fix show author name in last message of pending invites in chat list (#668)

* fix: show author name in last message of pending invites in chat list

* docs: update changelog
This commit is contained in:
Pepi
2026-05-18 10:34:04 -04:00
committed by GitHub
parent d2fdd3101e
commit 406e5cee74
3 changed files with 33 additions and 1 deletions
+31
View File
@@ -408,6 +408,37 @@ void main() {
expect(item.subtitle, 'Look at this');
expect(item.subtitleIcon, isNull);
});
testWidgets('shows "You: " prefix for own message in pending group', (tester) async {
await pumpTile(
tester,
_chatSummary(
pendingConfirmation: true,
lastMessageContent: 'My message',
lastMessageAuthor: testPubkeyA,
),
);
final item = tester.widget<WnChatListItem>(find.byType(WnChatListItem));
expect(item.prefixSubtitle, 'You: ');
expect(item.subtitle, 'My message');
});
testWidgets("shows author name prefix for other's message in pending group", (
tester,
) async {
await pumpTile(
tester,
_chatSummary(
pendingConfirmation: true,
lastMessageContent: 'Hello group',
lastMessageAuthor: testPubkeyB,
lastMessageAuthorDisplayName: 'Alice',
),
);
final item = tester.widget<WnChatListItem>(find.byType(WnChatListItem));
expect(item.prefixSubtitle, 'Alice: ');
expect(item.subtitle, 'Hello group');
});
});
});