♻️ Update the way to render total counts of data in UI, close #220

This commit is contained in:
2026-01-01 11:43:56 +08:00
parent 38dffa414f
commit 0a4e797eec
2 changed files with 9 additions and 12 deletions

View File

@@ -624,7 +624,8 @@ class _ChatMemberListSheet extends HookConsumerWidget {
@override
Widget build(BuildContext context, WidgetRef ref) {
final memberNotifier = ref.read(chatMemberListProvider(roomId).notifier);
final memberState = ref.watch(chatMemberListProvider(roomId));
final memberNotifier = ref.watch(chatMemberListProvider(roomId).notifier);
final roomIdentity = ref.watch(chatRoomIdentityProvider(roomId));
final chatRoom = ref.watch(chatRoomProvider(roomId));
@@ -664,7 +665,7 @@ class _ChatMemberListSheet extends HookConsumerWidget {
child: Row(
children: [
Text(
'members'.plural(memberNotifier.totalCount ?? 0),
'members'.plural(memberState.value?.totalCount ?? 0),
style: Theme.of(context).textTheme.headlineSmall?.copyWith(
fontWeight: FontWeight.w600,
letterSpacing: -0.5,