fix review

This commit is contained in:
Salvatore Giordano
2021-06-11 10:31:57 +02:00
parent a6ff8e7039
commit b1201003f5
11 changed files with 51 additions and 70 deletions
@@ -24,8 +24,8 @@ class UnreadIndicator extends StatelessWidget {
initialData: cid != null
? client.state.channels[cid]?.state?.unreadCount
: client.state.totalUnreadCount,
builder: (context, snapshot) {
if (snapshot == null || snapshot == 0) {
builder: (context, data) {
if (data == null || data == 0) {
return const Offstage();
}
return Material(
@@ -42,7 +42,7 @@ class UnreadIndicator extends StatelessWidget {
),
child: Center(
child: Text(
'${snapshot > 99 ? '99+' : snapshot}',
'${data > 99 ? '99+' : data}',
style: const TextStyle(
fontSize: 11,
color: Colors.white,