Fix alert message for zero chatters (#90)

This commit is contained in:
Tommy Chow 2022-06-29 06:54:17 -04:00
parent 7d844675ce
commit 3cc72bafcb

View file

@ -142,7 +142,17 @@ class _ChattersListState extends State<ChattersList> {
),
),
),
if (chatDetailsStore.filteredUsers.expand((element) => element).isEmpty)
if (chatDetailsStore.chatUsers?.chatterCount == 0)
const SliverFillRemaining(
hasScrollBody: false,
child: Center(
child: AlertMessage(
message: 'No chatters found',
icon: Icons.person_off,
),
),
)
else if (chatDetailsStore.filteredUsers.expand((element) => element).isEmpty)
const SliverFillRemaining(
hasScrollBody: false,
child: Center(