From 4e2e35691f84d14c3bfc78bea3b18395d2c2f310 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ullrich=20Sch=C3=A4fer?= Date: Tue, 8 Oct 2024 22:14:24 +0200 Subject: [PATCH] Fixing linter warning about shadowed `notification` --- .../sdk/feature/store/NotificationStore.kt | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/sdk/src/main/java/com/magicbell/sdk/feature/store/NotificationStore.kt b/sdk/src/main/java/com/magicbell/sdk/feature/store/NotificationStore.kt index 1f8d353..386d8a5 100644 --- a/sdk/src/main/java/com/magicbell/sdk/feature/store/NotificationStore.kt +++ b/sdk/src/main/java/com/magicbell/sdk/feature/store/NotificationStore.kt @@ -388,8 +388,8 @@ class NotificationStore internal constructor( return executeNotificationAction( notification, MARK_AS_READ, - modifications = { notification -> - markNotificationAsRead(notification, predicate) + modifications = { + markNotificationAsRead(it, predicate) }) } @@ -403,8 +403,8 @@ class NotificationStore internal constructor( return executeNotificationAction( notification, MARK_AS_UNREAD, - modifications = { notification -> - markNotificationAsUnread(notification, predicate) + modifications = { + markNotificationAsUnread(it, predicate) }) } @@ -418,8 +418,8 @@ class NotificationStore internal constructor( return executeNotificationAction( notification, ARCHIVE, - modifications = { notification -> - archiveNotification(notification, predicate) + modifications = { + archiveNotification(it, predicate) }) } @@ -433,8 +433,8 @@ class NotificationStore internal constructor( return executeNotificationAction( notification, UNARCHIVE, - modifications = { notification -> - notification.archivedAt = null + modifications = { + it.archivedAt = null }) } @@ -446,8 +446,8 @@ class NotificationStore internal constructor( suspend fun markAllNotificationAsRead(): Result { return executeAllNotificationsAction( MARK_ALL_AS_READ, - modifications = { notification -> - markNotificationAsRead(notification, predicate) + modifications = { + markNotificationAsRead(it, predicate) }) } @@ -459,9 +459,9 @@ class NotificationStore internal constructor( suspend fun markAllNotificationAsSeen(): Result { return executeAllNotificationsAction( MARK_ALL_AS_SEEN, - modifications = { notification -> - if (notification.seenAt == null) { - notification.seenAt = Date() + modifications = { + if (it.seenAt == null) { + it.seenAt = Date() unseenCount -= 1 } })