Stack notifications everywhere
We had client-side notification stacking in the tray since launch, but now we want to stack notifications in the notifications page, in API responses and in email bundles.
This commit is contained in:
@@ -2,12 +2,12 @@ class Cards::ReadingsController < ApplicationController
|
||||
include CardScoped
|
||||
|
||||
def create
|
||||
@notifications = @card.read_by(Current.user)
|
||||
@card.read_by(Current.user)
|
||||
record_board_access
|
||||
end
|
||||
|
||||
def destroy
|
||||
@notifications = @card.unread_by(Current.user)
|
||||
@card.unread_by(Current.user)
|
||||
record_board_access
|
||||
end
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
class Notifications::TraysController < ApplicationController
|
||||
def show
|
||||
@notifications = Current.user.notifications.preloaded.unread.ordered.limit(100)
|
||||
@notifications = Current.user.notifications.unread.preloaded.ordered.limit(100)
|
||||
|
||||
# Invalidate on the whole set instead of the unread set since the max updated at in the unread set
|
||||
# can stay the same when reading old notifications.
|
||||
|
||||
Reference in New Issue
Block a user