Skip to content

Commit

Permalink
参照1つの場合は引用に変換する設定を削除
Browse files Browse the repository at this point in the history
  • Loading branch information
kmycode committed Oct 1, 2023
1 parent 2d909dc commit 9f0f247
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 12 deletions.
4 changes: 0 additions & 4 deletions app/models/concerns/has_user_settings.rb
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,6 @@ def setting_link_preview
settings['link_preview']
end

def setting_single_ref_to_quote
settings['single_ref_to_quote']
end

def setting_dtl_force_with_tag
settings['dtl_force_with_tag']&.to_sym || :none
end
Expand Down
1 change: 0 additions & 1 deletion app/models/user_settings.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ class KeyError < Error; end
setting :dtl_force_with_tag, default: :none, in: %w(full searchability none)
setting :dtl_force_subscribable, default: false
setting :lock_follow_from_bot, default: false
setting :single_ref_to_quote, default: false
setting :allow_quote, default: true

setting_inverse_alias :indexable, :noindex
Expand Down
6 changes: 2 additions & 4 deletions app/serializers/activitypub/note_serializer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -170,12 +170,10 @@ def local?
object.account.local?
end

def quote?
@quote ||= (object.reference_objects.count == 1 && object.account.user&.settings&.[]('single_ref_to_quote')) || object.reference_objects.where(attribute_type: 'QT').count == 1
end
delegate :quote?, to: :object

def quote_post
@quote_post ||= object.quote || object.references.first
@quote_post ||= object.quote
end

def quote_uri
Expand Down
3 changes: 0 additions & 3 deletions app/views/settings/preferences/other/show.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@
.fields-group
= ff.input :lock_follow_from_bot, wrapper: :with_label, kmyblue: true, label: I18n.t('simple_form.labels.defaults.setting_lock_follow_from_bot')

.fields-group
= ff.input :single_ref_to_quote, wrapper: :with_label, kmyblue: true, label: I18n.t('simple_form.labels.defaults.setting_single_ref_to_quote'), hint: I18n.t('simple_form.hints.defaults.setting_single_ref_to_quote')

%h4= t 'preferences.posting_defaults'

.fields-row
Expand Down

0 comments on commit 9f0f247

Please sign in to comment.