Skip to content

Commit

Permalink
Fixing linter warning about shadowed notification
Browse files Browse the repository at this point in the history
  • Loading branch information
stigi committed Oct 9, 2024
1 parent 750ab90 commit 4e2e356
Showing 1 changed file with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -388,8 +388,8 @@ class NotificationStore internal constructor(
return executeNotificationAction(
notification,
MARK_AS_READ,
modifications = { notification ->
markNotificationAsRead(notification, predicate)
modifications = {
markNotificationAsRead(it, predicate)
})
}

Expand All @@ -403,8 +403,8 @@ class NotificationStore internal constructor(
return executeNotificationAction(
notification,
MARK_AS_UNREAD,
modifications = { notification ->
markNotificationAsUnread(notification, predicate)
modifications = {
markNotificationAsUnread(it, predicate)
})
}

Expand All @@ -418,8 +418,8 @@ class NotificationStore internal constructor(
return executeNotificationAction(
notification,
ARCHIVE,
modifications = { notification ->
archiveNotification(notification, predicate)
modifications = {
archiveNotification(it, predicate)
})
}

Expand All @@ -433,8 +433,8 @@ class NotificationStore internal constructor(
return executeNotificationAction(
notification,
UNARCHIVE,
modifications = { notification ->
notification.archivedAt = null
modifications = {
it.archivedAt = null
})
}

Expand All @@ -446,8 +446,8 @@ class NotificationStore internal constructor(
suspend fun markAllNotificationAsRead(): Result<Unit> {
return executeAllNotificationsAction(
MARK_ALL_AS_READ,
modifications = { notification ->
markNotificationAsRead(notification, predicate)
modifications = {
markNotificationAsRead(it, predicate)
})
}

Expand All @@ -459,9 +459,9 @@ class NotificationStore internal constructor(
suspend fun markAllNotificationAsSeen(): Result<Unit> {
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
}
})
Expand Down

0 comments on commit 4e2e356

Please sign in to comment.