mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 18:31:11 +08:00
FEATURE: Load fewer topics in the topic list on slow platforms (Android)
This commit is contained in:
@ -51,6 +51,10 @@ class ApplicationController < ActionController::Base
|
||||
@use_crawler_layout ||= (has_escaped_fragment? || CrawlerDetection.crawler?(request.user_agent))
|
||||
end
|
||||
|
||||
def slow_platform?
|
||||
request.user_agent =~ /Android/
|
||||
end
|
||||
|
||||
def set_layout
|
||||
use_crawler_layout? ? 'crawler' : 'application'
|
||||
end
|
||||
|
Reference in New Issue
Block a user