From 8723f292552814cfe4566f213005e4e190fca456 Mon Sep 17 00:00:00 2001 From: Mark Chao Date: Thu, 21 Mar 2019 21:38:52 +0800 Subject: Fix diff bottom expand button appears twice This is a quick fix by only append match line once when calling diff_lines_for_serializer multiple time. Also enable feature by default --- app/serializers/diff_file_entity.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app') diff --git a/app/serializers/diff_file_entity.rb b/app/serializers/diff_file_entity.rb index 13711070a46..066e30cd3bb 100644 --- a/app/serializers/diff_file_entity.rb +++ b/app/serializers/diff_file_entity.rb @@ -57,7 +57,7 @@ class DiffFileEntity < DiffFileBaseEntity diff_file.diff_lines_for_serializer end - expose :is_fully_expanded, if: -> (diff_file, _) { Feature.enabled?(:expand_diff_full_file) && diff_file.text? } do |diff_file| + expose :is_fully_expanded, if: -> (diff_file, _) { Feature.enabled?(:expand_diff_full_file, default_enabled: true) && diff_file.text? } do |diff_file| diff_file.fully_expanded? end -- cgit v1.2.1