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)
|
if (group.isDirectChat)
|
||||||
StreamBuilder<List<Contact>>(
|
StreamBuilder<List<Contact>>(
|
||||||
stream: twonlyDB.groupsDao.watchGroupContact(group.groupId),
|
stream: twonlyDB.groupsDao.watchGroupContact(
|
||||||
|
group.groupId,
|
||||||
|
),
|
||||||
builder: (context, snapshot) {
|
builder: (context, snapshot) {
|
||||||
final contacts = snapshot.data ?? [];
|
final contacts = snapshot.data ?? [];
|
||||||
if (contacts.isEmpty) return const SizedBox.shrink();
|
if (contacts.isEmpty) {
|
||||||
return ContactLabels(contactId: contacts.first.userId);
|
return const SizedBox.shrink();
|
||||||
|
}
|
||||||
|
return ContactLabels(
|
||||||
|
contactId: contacts.first.userId,
|
||||||
|
);
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue