mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08:00
Re-apply with fixes: Stop using user agent to detect mobile devices. Use a media query and yepnope to load the appropriate css and customizations.
This commit is contained in:
@ -26,7 +26,6 @@ class ApplicationController < ActionController::Base
|
||||
end
|
||||
|
||||
before_filter :set_locale
|
||||
before_filter :set_mobile_view
|
||||
before_filter :inject_preview_style
|
||||
before_filter :disable_customization
|
||||
before_filter :block_if_maintenance_mode
|
||||
@ -120,10 +119,6 @@ class ApplicationController < ActionController::Base
|
||||
end
|
||||
end
|
||||
|
||||
def set_mobile_view
|
||||
session[:mobile_view] = params[:mobile_view] if params.has_key?(:mobile_view)
|
||||
end
|
||||
|
||||
def inject_preview_style
|
||||
style = request['preview-style']
|
||||
session[:preview_style] = style if style
|
||||
|
Reference in New Issue
Block a user