Collections can be private now too
This commit is contained in:
@@ -17,10 +17,6 @@ class User::DayTimeline
|
||||
latest_event_before&.created_at
|
||||
end
|
||||
|
||||
def collections
|
||||
filter.collections.presence || user.collections
|
||||
end
|
||||
|
||||
def earliest_time
|
||||
next_day&.tomorrow&.beginning_of_day
|
||||
end
|
||||
@@ -34,6 +30,10 @@ class User::DayTimeline
|
||||
@filtered_events ||= Event.where(collection: collections)
|
||||
end
|
||||
|
||||
def collections
|
||||
filter.collections.presence || user.collections
|
||||
end
|
||||
|
||||
def latest_event_before
|
||||
filtered_events.where(created_at: ...day.beginning_of_day).chronologically.last
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user