Collections can be private now too

This commit is contained in:
Jorge Manrubia
2025-04-25 10:31:41 +02:00
parent b866267192
commit 5a431ba6bb
+4 -4
View File
@@ -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