2020-04-20 14:03:57 -07:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2014-08-01 02:47:25 -07:00
|
|
|
class StaticController < ApplicationController
|
|
|
|
def index
|
2014-12-08 05:14:13 -08:00
|
|
|
if user_signed_in?
|
2020-04-20 14:03:57 -07:00
|
|
|
@timeline = current_user.cursored_timeline(last_id: params[:last_id])
|
|
|
|
@timeline_last_id = @timeline.map(&:id).min
|
|
|
|
@more_data_available = !current_user.cursored_timeline(last_id: @timeline_last_id, size: 1).count.zero?
|
|
|
|
|
2014-12-08 05:14:13 -08:00
|
|
|
respond_to do |format|
|
|
|
|
format.html
|
|
|
|
format.js
|
|
|
|
end
|
2015-08-28 07:36:49 -07:00
|
|
|
else
|
|
|
|
return render 'static/front'
|
2014-12-08 05:14:13 -08:00
|
|
|
end
|
2014-08-01 02:47:25 -07:00
|
|
|
end
|
|
|
|
|
|
|
|
def about
|
2014-11-30 07:41:28 -08:00
|
|
|
@admins = User.where(admin: true).order(:id)
|
2014-08-01 02:47:25 -07:00
|
|
|
end
|
2015-01-07 12:30:52 -08:00
|
|
|
|
|
|
|
def faq
|
|
|
|
|
|
|
|
end
|
2015-01-16 13:36:39 -08:00
|
|
|
|
|
|
|
def privacy_policy
|
|
|
|
|
|
|
|
end
|
2015-01-16 14:16:28 -08:00
|
|
|
|
|
|
|
def terms
|
|
|
|
|
|
|
|
end
|
2014-08-01 02:47:25 -07:00
|
|
|
end
|