mirror of
https://github.com/discourse/discourse.git
synced 2025-06-04 11:11:13 +08:00
FIX: include crawler content on old mobile browsers (#16387)
Previous to this change an optimisation stripped crawler content from all mobile browsers. This had a side effect that meant that when we dropped support for an old mobile platform we would stop rendering topic and topic list pages. The new implementation ensures we only perform the optimisation on modern mobile browsers.
This commit is contained in:
@ -393,7 +393,11 @@ module ApplicationHelper
|
||||
end
|
||||
|
||||
def include_crawler_content?
|
||||
crawler_layout? || !mobile_view?
|
||||
crawler_layout? || !mobile_view? || !modern_mobile_device?
|
||||
end
|
||||
|
||||
def modern_mobile_device?
|
||||
MobileDetection.modern_mobile_device?(request.user_agent)
|
||||
end
|
||||
|
||||
def mobile_device?
|
||||
|
Reference in New Issue
Block a user