mirror of
https://github.com/twonlyapp/twonly-app.git
synced 2026-09-01 07:04:07 +00:00
fixes crash
This commit is contained in:
parent
b92ff26e81
commit
b2274ee9f5
1 changed files with 9 additions and 3 deletions
|
|
@ -331,11 +331,17 @@ class _ChatMessagesViewState extends State<ChatMessagesView>
|
|||
),
|
||||
if (group.isDirectChat)
|
||||
StreamBuilder<List<Contact>>(
|
||||
stream: twonlyDB.groupsDao.watchGroupContact(group.groupId),
|
||||
stream: twonlyDB.groupsDao.watchGroupContact(
|
||||
group.groupId,
|
||||
),
|
||||
builder: (context, snapshot) {
|
||||
final contacts = snapshot.data ?? [];
|
||||
if (contacts.isEmpty) return const SizedBox.shrink();
|
||||
return ContactLabels(contactId: contacts.first.userId);
|
||||
if (contacts.isEmpty) {
|
||||
return const SizedBox.shrink();
|
||||
}
|
||||
return ContactLabels(
|
||||
contactId: contacts.first.userId,
|
||||
);
|
||||
},
|
||||
),
|
||||
],
|
||||
|
|
|
|||
Loading…
Reference in a new issue