Paid Messages: Remove timer (#5850)
This commit is contained in:
parent
92d9f0736c
commit
3087fb85cc
@ -14,7 +14,7 @@ import {
|
||||
} from '../../../api/types';
|
||||
import { ManagementProgress } from '../../../types';
|
||||
|
||||
import { BOT_FATHER_USERNAME, GENERAL_REFETCH_INTERVAL, PAID_SEND_DELAY } from '../../../config';
|
||||
import { BOT_FATHER_USERNAME, GENERAL_REFETCH_INTERVAL } from '../../../config';
|
||||
import { copyTextToClipboard } from '../../../util/clipboard';
|
||||
import { getUsernameFromDeepLink } from '../../../util/deepLinkParser';
|
||||
import { getCurrentTabId } from '../../../util/establishMultitabRole';
|
||||
@ -438,6 +438,9 @@ addActionHandler('sendInlineBotResult', async (global, actions, payload): Promis
|
||||
return;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line eslint-multitab-tt/no-getactions-in-actions
|
||||
actions.sendInlineBotApiResult({ ...params });
|
||||
|
||||
// eslint-disable-next-line eslint-multitab-tt/no-getactions-in-actions
|
||||
actions.showNotification({
|
||||
localId: queryId,
|
||||
@ -445,14 +448,7 @@ addActionHandler('sendInlineBotResult', async (global, actions, payload): Promis
|
||||
message: {
|
||||
key: 'MessageSentPaidToastText', variables: { amount: formatStarsAsText(getTranslationFn(), starsForOneMessage) },
|
||||
},
|
||||
actionText: { key: 'ButtonUndo' },
|
||||
dismissAction: {
|
||||
action: 'sendInlineBotApiResult',
|
||||
payload: params,
|
||||
},
|
||||
duration: PAID_SEND_DELAY,
|
||||
shouldShowTimer: true,
|
||||
disableClickDismiss: true,
|
||||
|
||||
icon: 'star',
|
||||
shouldUseCustomIcon: true,
|
||||
type: 'paidMessage',
|
||||
|
||||
@ -29,7 +29,7 @@ import {
|
||||
MAX_MEDIA_FILES_FOR_ALBUM,
|
||||
MESSAGE_ID_REQUIRED_ERROR,
|
||||
MESSAGE_LIST_SLICE,
|
||||
PAID_SEND_DELAY, RE_TELEGRAM_LINK,
|
||||
RE_TELEGRAM_LINK,
|
||||
SERVICE_NOTIFICATIONS_USER_ID,
|
||||
SUPPORTED_AUDIO_CONTENT_TYPES,
|
||||
SUPPORTED_PHOTO_CONTENT_TYPES,
|
||||
@ -1713,6 +1713,9 @@ async function sendMessagesWithNotification<T extends GlobalState>(
|
||||
options: { pluralValue: messagesCount },
|
||||
};
|
||||
|
||||
// eslint-disable-next-line eslint-multitab-tt/no-getactions-in-actions
|
||||
getActions().sendMessages({ sendParams });
|
||||
|
||||
// eslint-disable-next-line eslint-multitab-tt/no-getactions-in-actions
|
||||
getActions().showNotification({
|
||||
localId: getMessageKey(firstMessage),
|
||||
@ -1721,20 +1724,6 @@ async function sendMessagesWithNotification<T extends GlobalState>(
|
||||
key: 'MessageSentPaidToastText',
|
||||
variables: { amount: formatStarsAsText(getTranslationFn(), starsForOneMessage * messagesCount) },
|
||||
},
|
||||
actionText: { key: 'ButtonUndo' },
|
||||
action: {
|
||||
action: 'deleteMessages',
|
||||
payload: { messageList: firstSendParam.messageList, messageIds: messageIdsForUndo, shouldDeleteForAll: true },
|
||||
},
|
||||
dismissAction: {
|
||||
action: 'sendMessages',
|
||||
payload: {
|
||||
sendParams,
|
||||
},
|
||||
},
|
||||
duration: PAID_SEND_DELAY,
|
||||
shouldShowTimer: true,
|
||||
disableClickDismiss: true,
|
||||
icon: 'star',
|
||||
shouldUseCustomIcon: true,
|
||||
type: 'paidMessage',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user