Version Notifications: Support formatting
This commit is contained in:
parent
691c0c4263
commit
b874082250
@ -46,7 +46,7 @@ import {
|
||||
} from '../../../modules/helpers';
|
||||
import { formatMediaDuration, formatVoiceRecordDuration, getDayStartAt } from '../../../util/dateFormat';
|
||||
import focusEditableElement from '../../../util/focusEditableElement';
|
||||
import parseMessageInput from './helpers/parseMessageInput';
|
||||
import parseMessageInput from '../../../util/parseMessageInput';
|
||||
import buildAttachment from './helpers/buildAttachment';
|
||||
import renderText from '../../common/helpers/renderText';
|
||||
import insertHtmlInSelection from '../../../util/insertHtmlInSelection';
|
||||
|
||||
@ -6,7 +6,7 @@ import React, {
|
||||
import { ApiNewPoll } from '../../../api/types';
|
||||
|
||||
import captureEscKeyListener from '../../../util/captureEscKeyListener';
|
||||
import parseMessageInput from './helpers/parseMessageInput';
|
||||
import parseMessageInput from '../../../util/parseMessageInput';
|
||||
import useLang from '../../../hooks/useLang';
|
||||
|
||||
import Button from '../../ui/Button';
|
||||
|
||||
@ -10,7 +10,7 @@ import { ISettings } from '../../../types';
|
||||
import { RE_LINK_TEMPLATE } from '../../../config';
|
||||
import { selectNoWebPage, selectTheme } from '../../../modules/selectors';
|
||||
import { pick } from '../../../util/iteratees';
|
||||
import parseMessageInput from './helpers/parseMessageInput';
|
||||
import parseMessageInput from '../../../util/parseMessageInput';
|
||||
import useOnChange from '../../../hooks/useOnChange';
|
||||
import useShowTransition from '../../../hooks/useShowTransition';
|
||||
import useCurrentOrPrev from '../../../hooks/useCurrentOrPrev';
|
||||
|
||||
@ -7,7 +7,7 @@ import { DRAFT_DEBOUNCE, EDITABLE_INPUT_ID } from '../../../../config';
|
||||
import usePrevious from '../../../../hooks/usePrevious';
|
||||
import { debounce } from '../../../../util/schedulers';
|
||||
import focusEditableElement from '../../../../util/focusEditableElement';
|
||||
import parseMessageInput from '../helpers/parseMessageInput';
|
||||
import parseMessageInput from '../../../../util/parseMessageInput';
|
||||
import getMessageTextAsHtml from '../helpers/getMessageTextAsHtml';
|
||||
import useBackgroundMode from '../../../../hooks/useBackgroundMode';
|
||||
import useBeforeUnload from '../../../../hooks/useBeforeUnload';
|
||||
|
||||
@ -4,7 +4,7 @@ import { ApiMessage } from '../../../../api/types';
|
||||
import { GlobalActions } from '../../../../global/types';
|
||||
|
||||
import { EDITABLE_INPUT_ID } from '../../../../config';
|
||||
import parseMessageInput from '../helpers/parseMessageInput';
|
||||
import parseMessageInput from '../../../../util/parseMessageInput';
|
||||
import getMessageTextAsHtml from '../helpers/getMessageTextAsHtml';
|
||||
import focusEditableElement from '../../../../util/focusEditableElement';
|
||||
import { hasMessageMedia } from '../../../../modules/helpers';
|
||||
|
||||
@ -38,6 +38,7 @@ import { getServerTime } from '../../../util/serverTime';
|
||||
|
||||
// @ts-ignore
|
||||
import versionNotification from '../../../versionNotification.txt';
|
||||
import parseMessageInput from '../../../util/parseMessageInput';
|
||||
|
||||
const FOCUS_DURATION = 1500;
|
||||
const FOCUS_NO_HIGHLIGHT_DURATION = FAST_SMOOTH_MAX_DURATION + ANIMATION_END_DELAY;
|
||||
@ -529,9 +530,7 @@ addReducer('checkVersionNotification', (global, actions) => {
|
||||
chatId: SERVICE_NOTIFICATIONS_USER_ID,
|
||||
date: getServerTime(global.serverTimeOffset),
|
||||
content: {
|
||||
text: {
|
||||
text: versionNotification,
|
||||
},
|
||||
text: parseMessageInput(versionNotification),
|
||||
},
|
||||
isOutgoing: false,
|
||||
};
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
import { ApiMessageEntity, ApiMessageEntityTypes, ApiFormattedText } from '../../../../api/types';
|
||||
import { IS_EMOJI_SUPPORTED } from '../../../../util/environment';
|
||||
import { ApiMessageEntity, ApiMessageEntityTypes, ApiFormattedText } from '../api/types';
|
||||
import { IS_EMOJI_SUPPORTED } from './environment';
|
||||
|
||||
const ENTITY_CLASS_BY_NODE_NAME: Record<string, string> = {
|
||||
B: ApiMessageEntityTypes.Bold,
|
||||
@ -1,3 +1,5 @@
|
||||
Welcome to dev version.
|
||||
**Welcome to the __dev__ version.**
|
||||
|
||||
⛱
|
||||
|
||||
This is a demo notification.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user