mirror of
https://github.com/discourse/discourse.git
synced 2024-12-01 06:53:46 +08:00
4d05e3edab
This commit makes pending reviewables show up in the main tab (a.k.a. "all notifications" tab). Pending reviewables along with unread notifications are always shown first and they're sorted based on their creation date (most recent comes first).
The dismiss button currently only shows up if there are unread notifications and it doesn't dismiss pending reviewables. We may follow up with another change soon that allows makes the dismiss button work with reviewables and remove them from the list without taking any action on them.
Follow-up to 079450c9e4
.
14 lines
260 B
Ruby
14 lines
260 B
Ruby
# frozen_string_literal: true
|
|
|
|
class BasicReviewableSerializer < ApplicationSerializer
|
|
attributes :flagger_username, :id, :type, :pending, :created_at
|
|
|
|
def flagger_username
|
|
object.created_by&.username
|
|
end
|
|
|
|
def pending
|
|
object.pending?
|
|
end
|
|
end
|