diff options
author | kibigo! <marrus-sh@users.noreply.github.com> | 2017-11-16 21:35:25 -0800 |
---|---|---|
committer | kibigo! <marrus-sh@users.noreply.github.com> | 2017-11-16 21:37:08 -0800 |
commit | 585758a373df05127b0d544ac5971ef67f053e83 (patch) | |
tree | 186e27d2256929e1c75d6f56ca0d31f2018259d4 /app/controllers | |
parent | b28b405b9763a0bb3df653b51e6d084b42e9a54d (diff) |
Themed prefetching
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/application_controller.rb | 5 | ||||
-rw-r--r-- | app/controllers/home_controller.rb | 1 |
2 files changed, 5 insertions, 1 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index a213302cb..f5dbe837e 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -13,6 +13,7 @@ class ApplicationController < ActionController::Base helper_method :current_account helper_method :current_session helper_method :current_theme + helper_method :theme_data helper_method :single_user_mode? rescue_from ActionController::RoutingError, with: :not_found @@ -88,6 +89,10 @@ class ApplicationController < ActionController::Base current_user.setting_theme end + def theme_data + Themes.instance.get(current_theme) + end + def cache_collection(raw, klass) return raw unless klass.respond_to?(:with_includes) diff --git a/app/controllers/home_controller.rb b/app/controllers/home_controller.rb index ad7f09f34..21dde20ce 100644 --- a/app/controllers/home_controller.rb +++ b/app/controllers/home_controller.rb @@ -6,7 +6,6 @@ class HomeController < ApplicationController def index @body_classes = 'app-body' - @frontend = (params[:frontend] and Rails.configuration.x.available_frontends.include? params[:frontend] + '.js') ? params[:frontend] : 'mastodon' end private |