Skip to content

Commit

Permalink
fix: increment notification count in creating ids
Browse files Browse the repository at this point in the history
Increment the notification count when generating a new notification ID
instead of using it as-is. This fix is similar to 1305cb7, it fixes the
same oversight.
  • Loading branch information
d3adb5 committed Sep 29, 2023
1 parent b0bfa2e commit 02e515e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/NMonad/Operations.hs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ indexNotification n = do

-- | Generates a new notification ID given knowledge of internal state. If unused, the ID may be reissued.
generateNotificationId :: N Word32
generateNotificationId = gets $ view notificationCount
generateNotificationId = gets $ (+1) . view notificationCount

-- | Removes a notification from internal state. The removed notification, if found, is returned.
removeNotification :: Word32 -> N (Maybe Notification)
Expand Down

0 comments on commit 02e515e

Please sign in to comment.