Force modern emoji experimental to be dev mode only (#35505)

This commit is contained in:
Echo 2025-07-24 16:55:00 +02:00 committed by GitHub
commit dfaca794bf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 26 additions and 19 deletions

View file

@ -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);

View file

@ -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');