diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index e24baddfff..73dbb2b6e5 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -101,10 +101,6 @@ class ApplicationController < ActionController::Base end end - def slow_platform? - request.user_agent =~ /Android/ - end - def set_layout use_crawler_layout? ? 'crawler' : 'application' end diff --git a/app/controllers/list_controller.rb b/app/controllers/list_controller.rb index a5f297e6b1..6434110e7c 100644 --- a/app/controllers/list_controller.rb +++ b/app/controllers/list_controller.rb @@ -381,7 +381,6 @@ class ListController < ApplicationController # hacky columns get special handling options[:topic_ids] = param_to_integer_list(:topic_ids) options[:no_subcategories] = options[:no_subcategories] == 'true' - options[:slow_platform] = slow_platform? options end diff --git a/app/controllers/tags_controller.rb b/app/controllers/tags_controller.rb index fccddd0e4a..515ddc5575 100644 --- a/app/controllers/tags_controller.rb +++ b/app/controllers/tags_controller.rb @@ -305,7 +305,6 @@ class TagsController < ::ApplicationController q: params[:q] } options[:no_subcategories] = true if params[:no_subcategories] == 'true' - options[:slow_platform] = true if slow_platform? if params[:tag_id] == 'none' options[:no_tags] = true diff --git a/app/controllers/topics_controller.rb b/app/controllers/topics_controller.rb index bf44a9746b..0ad89f3ff8 100644 --- a/app/controllers/topics_controller.rb +++ b/app/controllers/topics_controller.rb @@ -64,7 +64,6 @@ class TopicsController < ApplicationController opts = params.slice(:username_filters, :filter, :page, :post_number, :show_deleted) username_filters = opts[:username_filters] - opts[:slow_platform] = true if slow_platform? opts[:print] = true if params[:print].present? opts[:username_filters] = username_filters.split(',') if username_filters.is_a?(String) diff --git a/lib/topic_query.rb b/lib/topic_query.rb index 202d344470..843909c7ba 100644 --- a/lib/topic_query.rb +++ b/lib/topic_query.rb @@ -71,7 +71,6 @@ class TopicQuery tags match_all_tags no_subcategories - slow_platform no_tags) end @@ -464,7 +463,7 @@ class TopicQuery protected def per_page_setting - @options[:slow_platform] ? 15 : 30 + 30 end def private_messages_for(user, type) diff --git a/lib/topic_view.rb b/lib/topic_view.rb index 710ca9ddf1..cbbcba49b7 100644 --- a/lib/topic_view.rb +++ b/lib/topic_view.rb @@ -9,10 +9,6 @@ class TopicView attr_reader :topic, :posts, :guardian, :filtered_posts, :chunk_size, :print, :message_bus_last_id attr_accessor :draft, :draft_key, :draft_sequence, :user_custom_fields, :post_custom_fields, :post_number - def self.slow_chunk_size - 10 - end - def self.print_chunk_size 1000 end @@ -57,7 +53,6 @@ class TopicView @chunk_size = case - when options[:slow_platform] then TopicView.slow_chunk_size when @print then TopicView.print_chunk_size else TopicView.chunk_size end diff --git a/spec/components/topic_view_spec.rb b/spec/components/topic_view_spec.rb index 6dc6bc72c7..44ed4df41d 100644 --- a/spec/components/topic_view_spec.rb +++ b/spec/components/topic_view_spec.rb @@ -36,11 +36,6 @@ describe TopicView do expect(TopicView.new(topic.id, evil_trout).chunk_size).to eq(TopicView.chunk_size) end - it "returns `slow_chunk_size` when slow_platform is true" do - tv = TopicView.new(topic.id, evil_trout, slow_platform: true) - expect(tv.chunk_size).to eq(TopicView.slow_chunk_size) - end - it "returns `print_chunk_size` when print param is true" do tv = TopicView.new(topic.id, evil_trout, print: true) expect(tv.chunk_size).to eq(TopicView.print_chunk_size)