From 39c85974286edf014693fdfdc97b487a013d0e07 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Tue, 23 Jul 2024 22:09:20 +0800 Subject: [PATCH] :bug: Fix notification list render issue --- lib/screens/account/notification.dart | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/screens/account/notification.dart b/lib/screens/account/notification.dart index afe0b2f..76fb468 100644 --- a/lib/screens/account/notification.dart +++ b/lib/screens/account/notification.dart @@ -32,7 +32,7 @@ class _NotificationScreenState extends State { if (markList.isNotEmpty) { final client = auth.configureClient('auth'); - await client.put('/notifications/batch/read', {'messages': markList}); + await client.put('/notifications/read', {'messages': markList}); } provider.notifications.clear(); @@ -55,7 +55,7 @@ class _NotificationScreenState extends State { final client = auth.configureClient('auth'); - await client.put('/notifications/${element.id}/read', {}); + await client.put('/notifications/read/${element.id}', {}); provider.notifications.removeAt(index); @@ -98,14 +98,14 @@ class _NotificationScreenState extends State { ), if (provider.notifications.isNotEmpty) SliverToBoxAdapter( - child: ListTile( - tileColor: - Theme.of(context).colorScheme.secondaryContainer, - leading: const Icon(Icons.checklist), - title: Text('notifyAllRead'.tr), - contentPadding: - const EdgeInsets.symmetric(horizontal: 28), - onTap: _isBusy ? null : () => markAllRead(), + child: Container( + padding: const EdgeInsets.symmetric(horizontal: 10), + color: Theme.of(context).colorScheme.secondaryContainer, + child: ListTile( + leading: const Icon(Icons.checklist), + title: Text('notifyAllRead'.tr), + onTap: _isBusy ? null : () => markAllRead(), + ), ), ), SliverList.separated(