Add show stamp on timeline setting
This commit is contained in:
parent
e759258b5b
commit
51f645fb99
8 changed files with 15 additions and 5 deletions
|
@ -18,7 +18,7 @@ import Card from '../features/status/components/card';
|
|||
// to use the progress bar to show download progress
|
||||
import Bundle from '../features/ui/components/bundle';
|
||||
import { MediaGallery, Video, Audio } from '../features/ui/util/async-components';
|
||||
import { displayMedia, enableEmojiReaction } from '../initial_state';
|
||||
import { displayMedia, enableEmojiReaction, showEmojiReactionOnTimeline } from '../initial_state';
|
||||
|
||||
import { Avatar } from './avatar';
|
||||
import { AvatarOverlay } from './avatar_overlay';
|
||||
|
@ -577,8 +577,7 @@ class Status extends ImmutablePureComponent {
|
|||
let emojiReactionsBar = null;
|
||||
if (!this.props.withoutEmojiReactions && status.get('emoji_reactions')) {
|
||||
const emojiReactions = status.get('emoji_reactions');
|
||||
const emojiReactionPolicy = status.getIn(['account', 'other_settings', 'emoji_reaction_policy']) || 'allow';
|
||||
if (emojiReactions.size > 0 && enableEmojiReaction && emojiReactionPolicy !== 'block_and_hide') {
|
||||
if (emojiReactions.size > 0 && enableEmojiReaction && showEmojiReactionOnTimeline) {
|
||||
emojiReactionsBar = <StatusEmojiReactionsBar emojiReactions={emojiReactions} status={status} onEmojiReact={this.props.onEmojiReact} onUnEmojiReact={this.props.onUnEmojiReact} />;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -76,6 +76,7 @@
|
|||
* @property {string} repository
|
||||
* @property {boolean} search_enabled
|
||||
* @property {boolean} trends_enabled
|
||||
* @property {boolean} show_emoji_reaction_on_timeline
|
||||
* @property {boolean} single_user_mode
|
||||
* @property {string} source_url
|
||||
* @property {string} streaming_api_base_url
|
||||
|
@ -144,6 +145,7 @@ export const registrationsOpen = getMeta('registrations_open');
|
|||
export const repository = getMeta('repository');
|
||||
export const searchEnabled = getMeta('search_enabled');
|
||||
export const trendsEnabled = getMeta('trends_enabled');
|
||||
export const showEmojiReactionOnTimeline = getMeta('show_emoji_reaction_on_timeline');
|
||||
export const showTrends = getMeta('show_trends');
|
||||
export const singleUserMode = getMeta('single_user_mode');
|
||||
export const source_url = getMeta('source_url');
|
||||
|
|
|
@ -47,6 +47,10 @@ module HasUserSettings
|
|||
settings['web.enable_emoji_reaction']
|
||||
end
|
||||
|
||||
def setting_show_emoji_reaction_on_timeline
|
||||
settings['web.show_emoji_reaction_on_timeline']
|
||||
end
|
||||
|
||||
def setting_default_sensitive
|
||||
settings['default_sensitive']
|
||||
end
|
||||
|
|
|
@ -56,6 +56,7 @@ class UserSettings
|
|||
setting :enable_dtl_menu, default: false
|
||||
setting :hide_recent_emojis, default: false
|
||||
setting :enable_emoji_reaction, default: true
|
||||
setting :show_emoji_reaction_on_timeline, default: true
|
||||
setting :reblog_modal, default: false
|
||||
setting :unfollow_modal, default: true
|
||||
setting :reduce_motion, default: false
|
||||
|
|
|
@ -49,6 +49,7 @@ 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
|
||||
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
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
.fields-group
|
||||
= ff.input :'web.hide_recent_emojis', wrapper: :with_label, kmyblue: true, label: I18n.t('simple_form.labels.defaults.setting_hide_recent_emojis'), hint: false
|
||||
= ff.input :'web.enable_emoji_reaction', wrapper: :with_label, kmyblue: true, label: I18n.t('simple_form.labels.defaults.setting_enable_emoji_reaction'), hint: I18n.t('simple_form.hints.defaults.setting_enable_emoji_reaction')
|
||||
= ff.input :'web.show_emoji_reaction_on_timeline', wrapper: :with_label, kmyblue: true, label: I18n.t('simple_form.labels.defaults.setting_show_emoji_reaction_on_timeline')
|
||||
|
||||
.fields-group
|
||||
= ff.input :'web.bookmark_category_needed', wrapper: :with_label, kmyblue: true, label: I18n.t('simple_form.labels.defaults.setting_bookmark_category_needed'), hint: I18n.t('simple_form.hints.defaults.setting_bookmark_category_needed')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue