Skip to content

Commit f4107eb

Browse files
committed
Skip API requset on markAsRead if already read
1 parent 3eb204a commit f4107eb

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/providers/notification_provider.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ class NotificationProvider extends ChangeNotifier {
4949
}
5050

5151
Future<void> markAsRead({required sdk.Notification notification}) async {
52+
if (notification.isRead) return;
53+
5254
try {
5355
final request = sdk.PatchedNotificationRequest((b) => b..isRead = true);
5456
await notificationsApi.partialUpdate(

0 commit comments

Comments
 (0)