DEV: Namespace chat_header_indicator UserOption enum (#22152)

Previously this was defining methods like `UserOption#never?`, `UserOption#all_new?`, `UserOption#dm_and_mentions?`. Now they will be prefixed like `UserOption#chat_header_indicator_never?`
This commit is contained in:
David Taylor
2023-06-16 13:14:53 +01:00
committed by GitHub
parent 7db6d27292
commit 6e143c6157

View File

@@ -22,8 +22,10 @@ module Chat
base.enum :chat_email_frequency, base.chat_email_frequencies, prefix: "send_chat_email"
end
if !base.method_defined?(:never?) # Avoid attempting to override when autoloading
base.enum :chat_header_indicator_preference, base.chat_header_indicator_preferences
if !base.method_defined?(:chat_header_indicator_never?) # Avoid attempting to override when autoloading
base.enum :chat_header_indicator_preference,
base.chat_header_indicator_preferences,
prefix: "chat_header_indicator"
end
end
end