Force modern emoji experimental to be dev mode only (#35505)
This commit is contained in:
parent
6fc77a545b
commit
dfaca794bf
6 changed files with 26 additions and 19 deletions
|
|
@ -3,8 +3,8 @@ import { useCallback } from 'react';
|
|||
import { useLinks } from 'mastodon/hooks/useLinks';
|
||||
|
||||
import { EmojiHTML } from '../features/emoji/emoji_html';
|
||||
import { isFeatureEnabled } from '../initial_state';
|
||||
import { useAppSelector } from '../store';
|
||||
import { isModernEmojiEnabled } from '../utils/environment';
|
||||
|
||||
interface AccountBioProps {
|
||||
className: string;
|
||||
|
|
@ -32,9 +32,7 @@ export const AccountBio: React.FC<AccountBioProps> = ({
|
|||
if (!account) {
|
||||
return '';
|
||||
}
|
||||
return isFeatureEnabled('modern_emojis')
|
||||
? account.note
|
||||
: account.note_emojified;
|
||||
return isModernEmojiEnabled() ? account.note : account.note_emojified;
|
||||
});
|
||||
const extraEmojis = useAppSelector((state) => {
|
||||
const account = state.accounts.get(accountId);
|
||||
|
|
|
|||
|
|
@ -13,8 +13,9 @@ import ChevronRightIcon from '@/material-icons/400-24px/chevron_right.svg?react'
|
|||
import { Icon } from 'mastodon/components/icon';
|
||||
import { Poll } from 'mastodon/components/poll';
|
||||
import { identityContextPropShape, withIdentity } from 'mastodon/identity_context';
|
||||
import { autoPlayGif, isFeatureEnabled, languages as preloadedLanguages } from 'mastodon/initial_state';
|
||||
import { autoPlayGif, languages as preloadedLanguages } from 'mastodon/initial_state';
|
||||
import { EmojiHTML } from '../features/emoji/emoji_html';
|
||||
import { isModernEmojiEnabled } from '../utils/environment';
|
||||
|
||||
const MAX_HEIGHT = 706; // 22px * 32 (+ 2px padding at the top)
|
||||
|
||||
|
|
@ -24,7 +25,7 @@ const MAX_HEIGHT = 706; // 22px * 32 (+ 2px padding at the top)
|
|||
* @returns {string}
|
||||
*/
|
||||
export function getStatusContent(status) {
|
||||
if (isFeatureEnabled('modern_emojis')) {
|
||||
if (isModernEmojiEnabled()) {
|
||||
return status.getIn(['translation', 'content']) || status.get('content');
|
||||
}
|
||||
return status.getIn(['translation', 'contentHtml']) || status.get('contentHtml');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue