diff --git a/app/Services/Logic/User/Console/NotificationRead.php b/app/Services/Logic/User/Console/NotificationRead.php index d33c5f20..5389db2a 100644 --- a/app/Services/Logic/User/Console/NotificationRead.php +++ b/app/Services/Logic/User/Console/NotificationRead.php @@ -17,6 +17,12 @@ class NotificationRead extends LogicService { $user = $this->getLoginUser(); + if ($user->notice_count == 0) return; + + $user->notice_count = 0; + + $user->update(); + $notifyRepo = new NotificationRepo(); $notifyRepo->markAllAsViewed($user->id);