mirror of
https://github.com/neocities/neocities.git
synced 2025-08-03 00:02:00 +02:00
show some site change activity in global activity
This commit is contained in:
parent
293ce32b16
commit
3e8514fde4
2 changed files with 23 additions and 1 deletions
|
@ -8,7 +8,20 @@ get '/activity' do
|
|||
global_dataset.where! Sequel.qualify(:events, :id) => params[:event_id]
|
||||
end
|
||||
|
||||
@events = global_dataset.all
|
||||
events = global_dataset.all
|
||||
site_change_events = Event.global_site_changes_dataset.limit(25).all
|
||||
|
||||
@events = []
|
||||
|
||||
events.each do |event|
|
||||
unless site_change_events.empty?
|
||||
until site_change_events.first.created_at < event.created_at
|
||||
@events << site_change_events.shift
|
||||
break if site_change_events.empty?
|
||||
end
|
||||
end
|
||||
@events << event
|
||||
end
|
||||
|
||||
erb :'activity'
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue