mod: 私信列表页支持未读条数显示

This commit is contained in:
orz12
2024-01-24 12:38:10 +08:00
parent fbea5a1104
commit 772a6a9843

View File

@@ -140,14 +140,17 @@ class _WhisperPageState extends State<WhisperPage> {
}, },
), ),
leading: Badge( leading: Badge(
isLabelVisible: false, isLabelVisible:
sessionList[i].unreadCount > 0,
backgroundColor: Theme.of(context) backgroundColor: Theme.of(context)
.colorScheme .colorScheme
.primary, .primary,
label: Text(sessionList[i] textColor: Theme.of(context)
.unreadCount .colorScheme
.toString()), .onInverseSurface,
alignment: Alignment.bottomRight, label: Text(
" ${sessionList[i].unreadCount.toString()} "),
alignment: Alignment.topRight,
child: NetworkImgLayer( child: NetworkImgLayer(
width: 45, width: 45,
height: 45, height: 45,