Add: #213 右サイドメニューからお気に入りを削除するオプション (#262)

This commit is contained in:
KMY(雪あすか) 2023-11-09 11:53:57 +09:00 committed by GitHub
parent 85a6631709
commit e3c71cb3e4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 61 additions and 36 deletions

View file

@ -51,10 +51,8 @@ class InitialStateSerializer < ActiveModel::Serializer
store[:display_media_expand] = object.current_account.user.setting_display_media_expand
store[:expand_spoilers] = object.current_account.user.setting_expand_spoilers
store[:enable_emoji_reaction] = object.current_account.user.setting_enable_emoji_reaction && Setting.enable_emoji_reaction
store[:show_emoji_reaction_on_timeline] = object.current_account.user.setting_show_emoji_reaction_on_timeline
store[:enable_login_privacy] = object.current_account.user.setting_enable_login_privacy
store[:enable_dtl_menu] = object.current_account.user.setting_enable_dtl_menu
store[:hide_recent_emojis] = object.current_account.user.setting_hide_recent_emojis
store[:reduce_motion] = object.current_account.user.setting_reduce_motion
store[:disable_swiping] = object.current_account.user.setting_disable_swiping
store[:advanced_layout] = object.current_account.user.setting_advanced_layout
@ -63,19 +61,24 @@ class InitialStateSerializer < ActiveModel::Serializer
store[:show_trends] = Setting.trends && object.current_account.user.setting_trends
store[:bookmark_category_needed] = object.current_account.user.setting_bookmark_category_needed
store[:simple_timeline_menu] = object.current_account.user.setting_simple_timeline_menu
store[:show_quote_in_home] = object.current_account.user.setting_show_quote_in_home
store[:show_quote_in_public] = object.current_account.user.setting_show_quote_in_public
store[:hide_blocking_quote] = object.current_account.user.setting_hide_blocking_quote
store[:hide_emoji_reaction_unavailable_server] = object.current_account.user.setting_hide_emoji_reaction_unavailable_server
store[:hide_items] = [
object.current_account.user.setting_hide_favourite_menu ? 'favourite_menu' : nil,
object.current_account.user.setting_hide_recent_emojis ? 'recent_emojis' : nil,
object.current_account.user.setting_hide_blocking_quote ? 'blocking_quote' : nil,
object.current_account.user.setting_hide_emoji_reaction_unavailable_server ? 'emoji_reaction_unavailable_server' : nil,
object.current_account.user.setting_show_emoji_reaction_on_timeline ? nil : 'emoji_reaction_on_timeline',
object.current_account.user.setting_show_quote_in_home ? nil : 'quote_in_home',
object.current_account.user.setting_show_quote_in_public ? nil : 'quote_in_public',
].compact
else
store[:auto_play_gif] = Setting.auto_play_gif
store[:display_media] = Setting.display_media
store[:reduce_motion] = Setting.reduce_motion
store[:use_blurhash] = Setting.use_blurhash
store[:enable_emoji_reaction] = Setting.enable_emoji_reaction
store[:show_emoji_reaction_on_timeline] = Setting.enable_emoji_reaction
store[:show_quote_in_home] = true
store[:show_quote_in_public] = true
store[:hide_items] = [
Setting.enable_emoji_reaction ? nil : 'emoji_reaction_on_timeline',
].compact
end
store[:disabled_account_id] = object.disabled_account.id.to_s if object.disabled_account