diff --git a/src/api/gramjs/apiBuilders/chats.ts b/src/api/gramjs/apiBuilders/chats.ts index 2b5c9d794..ca1b62e91 100644 --- a/src/api/gramjs/apiBuilders/chats.ts +++ b/src/api/gramjs/apiBuilders/chats.ts @@ -710,7 +710,7 @@ export function buildThreadReadState( const forumTopic = input instanceof GramJs.ForumTopic ? input : undefined; const { unreadReactionsCount } = dialog || monoForumDialog || forumTopic || {}; - const { unreadMentionsCount } = dialog || forumTopic || {}; + const { unreadMentionsCount, unreadPollVotesCount } = dialog || forumTopic || {}; const { unreadMark } = dialog || monoForumDialog || {}; return omitUndefined({ @@ -718,6 +718,7 @@ export function buildThreadReadState( lastReadInboxMessageId: readInboxMaxId, lastReadOutboxMessageId: readOutboxMaxId, unreadReactionsCount, + unreadPollVotesCount, unreadMentionsCount, hasUnreadMark: unreadMark, }); diff --git a/src/api/gramjs/methods/messages.ts b/src/api/gramjs/methods/messages.ts index 1b4af3af5..aae1a2c6d 100644 --- a/src/api/gramjs/methods/messages.ts +++ b/src/api/gramjs/methods/messages.ts @@ -45,6 +45,7 @@ import { MAX_INT_32, MENTION_UNREAD_SLICE, MESSAGE_ID_REQUIRED_ERROR, + POLL_UNREAD_SLICE, REACTION_UNREAD_SLICE, SUPPORTED_PHOTO_CONTENT_TYPES, SUPPORTED_VIDEO_CONTENT_TYPES, @@ -2298,6 +2299,27 @@ export async function readAllReactions({ } } +export async function readAllPollVotes({ + chat, + threadId, +}: { + chat: ApiChat; + threadId?: ThreadId; +}) { + const result = await invokeRequest(new GramJs.messages.ReadPollVotes({ + peer: buildInputPeer(chat.id, chat.accessHash), + topMsgId: threadId ? Number(threadId) : undefined, + })); + + if (!result) return; + + processAffectedHistory(chat, result); + + if (result.offset) { + await readAllPollVotes({ chat, threadId }); + } +} + export async function fetchUnreadMentions({ chat, threadId, offsetId, addOffset, maxId, minId, }: { @@ -2376,6 +2398,45 @@ export async function fetchUnreadReactions({ }; } +export async function fetchUnreadPollVotes({ + chat, threadId, offsetId, addOffset, maxId, minId, +}: { + chat: ApiChat; + threadId?: ThreadId; + offsetId?: number; + addOffset?: number; + maxId?: number; + minId?: number; +}) { + const result = await invokeRequest(new GramJs.messages.GetUnreadPollVotes({ + peer: buildInputPeer(chat.id, chat.accessHash), + topMsgId: threadId ? Number(threadId) : undefined, + limit: POLL_UNREAD_SLICE, + offsetId: offsetId ?? DEFAULT_PRIMITIVES.INT, + addOffset: addOffset ?? DEFAULT_PRIMITIVES.INT, + maxId: maxId ?? DEFAULT_PRIMITIVES.INT, + minId: minId ?? DEFAULT_PRIMITIVES.INT, + })); + + if ( + !result + || result instanceof GramJs.messages.MessagesNotModified + || !result.messages + ) { + return undefined; + } + + const totalCount = 'count' in result ? result.count : result.messages.length; + const messages = result.messages.map(buildApiMessage).filter(Boolean); + const topics = result.topics.map(buildApiTopicWithState).filter(Boolean); + + return { + totalCount, + messages, + topics, + }; +} + export async function transcribeAudio({ chat, messageId, }: { diff --git a/src/assets/font-icons/poll-badge.svg b/src/assets/font-icons/poll-badge.svg new file mode 100644 index 000000000..68cd4a856 --- /dev/null +++ b/src/assets/font-icons/poll-badge.svg @@ -0,0 +1 @@ + diff --git a/src/assets/localization/fallback.strings b/src/assets/localization/fallback.strings index 11efd9b9d..909a6b1aa 100644 --- a/src/assets/localization/fallback.strings +++ b/src/assets/localization/fallback.strings @@ -109,6 +109,7 @@ "AnonymousPoll" = "Anonymous Poll"; "AccDescrReactionMentionDown" = "Go to next unread reactions"; "AccDescrMentionDown" = "Go to next mention"; +"AccDescrPollVoteDown" = "Go to next unread poll vote"; "AccDescrPageDown" = "Go to bottom"; "ChannelPrivate" = "Private Channel"; "ChannelPrivateInfo" = "Private channels can only be joined via invite link."; diff --git a/src/components/left/main/ChatBadge.module.scss b/src/components/left/main/ChatBadge.module.scss index daedf7648..6d970f888 100644 --- a/src/components/left/main/ChatBadge.module.scss +++ b/src/components/left/main/ChatBadge.module.scss @@ -90,6 +90,10 @@ background-color: #ed504f; } +.poll { + background-color: var(--color-primary); +} + .round { display: grid; place-content: center; diff --git a/src/components/left/main/ChatBadge.tsx b/src/components/left/main/ChatBadge.tsx index 507b8525a..d1add24d1 100644 --- a/src/components/left/main/ChatBadge.tsx +++ b/src/components/left/main/ChatBadge.tsx @@ -69,6 +69,7 @@ const ChatBadge = ({ const { unreadMentionsCount: stateUnreadMentionsCount = 0, + unreadPollVotesCount: stateUnreadPollVotesCount = 0, unreadReactionsCount: stateUnreadReactionsCount = 0, unreadCount: stateUnreadCount = 0, hasUnreadMark, @@ -95,12 +96,29 @@ const ChatBadge = ({ const topicsWithUnreadMentionsIds = useMemo(() => ( isForum && listedTopicIds ? listedTopicIds.filter((tId) => topicsReadStates[tId]?.unreadMentionsCount) : undefined ), [listedTopicIds, isForum, topicsReadStates]); + const topicsWithUnreadPollVotesIds = useMemo(() => ( + isForum && listedTopicIds ? listedTopicIds.filter((tId) => topicsReadStates[tId]?.unreadPollVotesCount) : undefined + ), [listedTopicIds, isForum, topicsReadStates]); const topicsWithUnreadReactionsIds = useMemo(() => ( isForum && listedTopicIds ? listedTopicIds.filter((tId) => topicsReadStates[tId]?.unreadReactionsCount) : undefined ), [listedTopicIds, isForum, topicsReadStates]); + const topicsWithStatefulUnreadIds = useMemo(() => { + if (!isForum) { + return undefined; + } + + const allTopicIds = [ + ...(topicsWithUnreadIds || []), + ...(topicsWithUnreadPollVotesIds || []), + ...(topicsWithUnreadReactionsIds || []), + ]; + + return allTopicIds.length ? [...new Set(allTopicIds)] : []; + }, [isForum, topicsWithUnreadIds, topicsWithUnreadPollVotesIds, topicsWithUnreadReactionsIds]); const unreadCount = isForum ? topicsWithUnreadIds?.length : stateUnreadCount; const unreadMentionsCount = isForum ? topicsWithUnreadMentionsIds?.length : stateUnreadMentionsCount; + const unreadPollVotesCount = isForum ? topicsWithUnreadPollVotesIds?.length : stateUnreadPollVotesCount; const unreadReactionsCount = isForum ? topicsWithUnreadReactionsIds?.length : stateUnreadReactionsCount; const shouldBeUnMuted = useMemo(() => { @@ -108,17 +126,21 @@ const ChatBadge = ({ return !isMuted || topic?.notifySettings.mutedUntil === 0; } - if (isMuted) { - return topicsWithUnreadIds?.some((tId) => topicsById?.[tId]?.notifySettings.mutedUntil === 0); + if (!topicsWithStatefulUnreadIds?.length) { + return !isMuted; } - const isEveryUnreadMuted = topicsWithUnreadIds?.every((tId) => { + if (isMuted) { + return topicsWithStatefulUnreadIds.some((tId) => topicsById?.[tId]?.notifySettings.mutedUntil === 0); + } + + const isEveryUnreadMuted = topicsWithStatefulUnreadIds.every((tId) => { const mutedUntil = topicsById?.[tId]?.notifySettings.mutedUntil; return mutedUntil && mutedUntil > getServerTime(); }); return !isEveryUnreadMuted; - }, [isForum, isMuted, topicsWithUnreadIds, topicsById, topic?.notifySettings.mutedUntil]); + }, [isForum, isMuted, topicsById, topic?.notifySettings.mutedUntil, topicsWithStatefulUnreadIds]); const isUnread = Boolean((unreadCount || hasUnreadMark) && !isSavedDialog); @@ -127,7 +149,7 @@ const ChatBadge = ({ [forceHidden], ); const isShown = !resolvedForceHidden && Boolean( - unreadCount || unreadMentionsCount || hasUnreadMark || isPinned || unreadReactionsCount + unreadCount || unreadMentionsCount || unreadPollVotesCount || hasUnreadMark || isPinned || unreadReactionsCount || isTopicUnopened || hasMiniApp, ); @@ -152,6 +174,12 @@ const ChatBadge = ({ ); + const unreadPollVotesElement = unreadPollVotesCount && ( +
+ +
+ ); + const unreadMentionsElement = unreadMentionsCount && (
@@ -187,10 +215,16 @@ const ChatBadge = ({ ); const visiblePinnedElement = !unreadCountElement && !unreadMentionsElement && !unreadReactionsElement + && !unreadPollVotesElement && pinnedElement; const elements = [ - unopenedTopicElement, unreadReactionsElement, unreadMentionsElement, unreadCountElement, visiblePinnedElement, + unopenedTopicElement, + unreadPollVotesElement, + unreadReactionsElement, + unreadMentionsElement, + unreadCountElement, + visiblePinnedElement, ].filter(Boolean); if (isSavedDialog) return pinnedElement; @@ -204,7 +238,11 @@ const ChatBadge = ({ if (shouldShowOnlyMostImportant) { const importanceOrderedElements = [ - unreadMentionsElement, unreadCountElement, unreadReactionsElement, pinnedElement, + unreadPollVotesElement, + unreadReactionsElement, + unreadMentionsElement, + unreadCountElement, + pinnedElement, ].filter(Boolean); return importanceOrderedElements[0]; } diff --git a/src/components/middle/FloatingActionButtons.module.scss b/src/components/middle/FloatingActionButtons.module.scss index f96407df4..64aa20774 100644 --- a/src/components/middle/FloatingActionButtons.module.scss +++ b/src/components/middle/FloatingActionButtons.module.scss @@ -1,6 +1,7 @@ .root { --base-bottom-pos: 5.3125rem; --translate-y: 4.5rem; + --unread-count-button-offset: 3.5rem; pointer-events: none; @@ -14,23 +15,6 @@ transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease; - .hidden { - pointer-events: none; - opacity: 0; - } - - .reactions { - transition: 0.2s ease opacity, 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) transform; - } - - .transform-down { - transform: translateY(3.5rem); - } - - .unread { - pointer-events: none; - } - :global(body.no-page-transitions) & { --translate-y: 0 !important; @@ -52,7 +36,7 @@ } &.hide-scroll-down { - --translate-y: 3.5rem; + --translate-y: var(--unread-count-button-offset); .unread { pointer-events: none; @@ -75,3 +59,24 @@ } } } + +.hidden { + pointer-events: none; + opacity: 0; +} + +.unreadCountButton { + transition: opacity 0.2s ease, transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1); +} + +.transformDown { + transform: translateY(var(--unread-count-button-offset)); +} + +.transformDownDouble { + transform: translateY(calc(var(--unread-count-button-offset) * 2)); +} + +.unread { + pointer-events: none; +} diff --git a/src/components/middle/FloatingActionButtons.tsx b/src/components/middle/FloatingActionButtons.tsx index 8cb8ed6f2..26c0c3a2b 100644 --- a/src/components/middle/FloatingActionButtons.tsx +++ b/src/components/middle/FloatingActionButtons.tsx @@ -2,6 +2,7 @@ import { memo, useEffect, useRef } from '../../lib/teact/teact'; import { getActions, withGlobal } from '../../global'; import type { MessageListType, ThreadId, ThreadReadState } from '../../types'; +import type { IconName } from '../../types/icons'; import { selectChat, selectCurrentMessageList, selectCurrentMiddleSearch } from '../../global/selectors'; import { selectThreadReadState } from '../../global/selectors/threads'; @@ -27,6 +28,16 @@ type StateProps = { shouldShowCount?: boolean; }; +type UnreadCountButton = { + icon: IconName; + ariaLabelLang: string; + unreadCount?: number; + isHidden: boolean; + hiddenUnreadCountButtonsBelow: number; + onClick: VoidFunction; + onReadAll: VoidFunction; +}; + const FloatingActionButtons = ({ withScrollDown, canPost, @@ -38,19 +49,40 @@ const FloatingActionButtons = ({ shouldShowCount, }: OwnProps & StateProps) => { const { - focusNextReply, focusNextReaction, focusNextMention, loadUnreadReactions, - readAllMentions, readAllReactions, loadUnreadMentions, scrollMessageListToBottom, + focusNextPollVote, + focusNextReply, + focusNextReaction, + focusNextMention, + loadUnreadPollVotes, + loadUnreadReactions, + readAllMentions, + readAllPollVotes, + readAllReactions, + loadUnreadMentions, + scrollMessageListToBottom, } = getActions(); const elementRef = useRef(); const { - unreadReactionsCount, unreadMentionsCount, unreadCount, unreadReactions, unreadMentions, + unreadPollVotesCount, + unreadReactionsCount, + unreadMentionsCount, + unreadCount, + unreadPollVotes, + unreadReactions, + unreadMentions, } = (shouldShowCount && threadReadState) || {}; + const hasUnreadPollVotes = Boolean(unreadPollVotesCount); const hasUnreadReactions = Boolean(unreadReactionsCount); const hasUnreadMentions = Boolean(unreadMentionsCount); + const handleReadAllPollVotes = useLastCallback(() => { + if (!chatId) return; + readAllPollVotes({ chatId, threadId }); + }); + const handleReadAllReactions = useLastCallback(() => { if (!chatId) return; readAllReactions({ chatId, threadId }); @@ -61,6 +93,12 @@ const FloatingActionButtons = ({ readAllMentions({ chatId, threadId }); }); + useEffect(() => { + if (hasUnreadPollVotes && chatId && !unreadPollVotes?.length) { + loadUnreadPollVotes({ chatId, threadId }); + } + }, [chatId, threadId, hasUnreadPollVotes, unreadPollVotes?.length]); + useEffect(() => { if (hasUnreadReactions && chatId && !unreadReactions?.length) { loadUnreadReactions({ chatId, threadId }); @@ -90,42 +128,87 @@ const FloatingActionButtons = ({ focusNextReaction({ chatId, threadId }); }); + const handleFocusNextPollVote = useLastCallback(() => { + if (!chatId) return; + focusNextPollVote({ chatId, threadId }); + }); + const handleFocusNextMention = useLastCallback(() => { if (!chatId) return; focusNextMention({ chatId, threadId }); }); + const unreadCountButtonsConfig = [ + { + icon: 'poll', + ariaLabelLang: 'AccDescrPollVoteDown', + unreadCount: unreadPollVotesCount, + isHidden: !hasUnreadPollVotes, + onClick: handleFocusNextPollVote, + onReadAll: handleReadAllPollVotes, + }, + { + icon: 'heart-outline', + ariaLabelLang: 'AccDescrReactionMentionDown', + unreadCount: unreadReactionsCount, + isHidden: !hasUnreadReactions, + onClick: handleFocusNextReaction, + onReadAll: handleReadAllReactions, + }, + { + icon: 'mention', + ariaLabelLang: 'AccDescrMentionDown', + unreadCount: unreadMentionsCount, + isHidden: !hasUnreadMentions, + onClick: handleFocusNextMention, + onReadAll: handleReadAllMentions, + }, + ] satisfies Omit[]; + + let hiddenUnreadCountButtonsBelow = 0; + const unreadCountButtons = unreadCountButtonsConfig.reduceRight((result, button) => { + result.unshift({ + ...button, + hiddenUnreadCountButtonsBelow, + }); + + if (button.isHidden) { + hiddenUnreadCountButtonsBelow++; + } + + return result; + }, []); + + const hasUnreadCountButtons = unreadCountButtons.some((button) => !button.isHidden); + + const buildUnreadCountButtonClassName = (button: UnreadCountButton) => buildClassName( + styles.unreadCountButton, + button.isHidden && styles.hidden, + button.hiddenUnreadCountButtonsBelow === 1 && styles.transformDown, + button.hiddenUnreadCountButtonsBelow === 2 && styles.transformDownDouble, + ); + const fabClassName = buildClassName( styles.root, - (withScrollDown || hasUnreadReactions || hasUnreadMentions) && styles.revealed, - (hasUnreadReactions || hasUnreadMentions) && !withScrollDown && styles.hideScrollDown, + (withScrollDown || hasUnreadCountButtons) && styles.revealed, + hasUnreadCountButtons && !withScrollDown && styles.hideScrollDown, !canPost && styles.noComposer, !withExtraShift && styles.noExtraShift, ); return (
- - - + {unreadCountButtons.map((button) => ( + + ))} ( (global): Complete => { const currentMessageList = selectCurrentMessageList(global); if (!currentMessageList) { - return {} as Complete; + return { + chatId: undefined, + messageListType: undefined, + shouldShowCount: undefined, + threadId: undefined, + threadReadState: undefined, + }; } const { chatId, threadId, type: messageListType } = currentMessageList; diff --git a/src/components/middle/hooks/useMessageObservers.ts b/src/components/middle/hooks/useMessageObservers.ts index d210a0de0..0f01c98ca 100644 --- a/src/components/middle/hooks/useMessageObservers.ts +++ b/src/components/middle/hooks/useMessageObservers.ts @@ -33,7 +33,7 @@ export default function useMessageObservers({ onIntersectPinnedMessage: OnIntersectPinnedMessage | undefined; }) { const { - markMessageListRead, markMentionsRead, animateUnreadReaction, + markMessageListRead, markMentionsRead, markPollVotesRead, animateUnreadReaction, scheduleForViewsIncrement, } = getActions(); @@ -61,6 +61,7 @@ export default function useMessageObservers({ let maxId = 0; const mentionIds: number[] = []; + const pollVoteIds: number[] = []; const reactionIds: number[] = []; const scheduledToUpdateViews: number[] = []; @@ -91,6 +92,10 @@ export default function useMessageObservers({ mentionIds.push(messageId); } + if (dataset.hasUnreadPollVote) { + pollVoteIds.push(messageId); + } + if (dataset.hasUnreadReaction) { reactionIds.push(messageId); } @@ -113,6 +118,10 @@ export default function useMessageObservers({ markMentionsRead({ chatId, messageIds: mentionIds }); } + if (pollVoteIds.length) { + markPollVotesRead({ chatId, messageIds: pollVoteIds }); + } + if (scheduledToUpdateViews.length) { scheduleForViewsIncrement({ chatId, ids: scheduledToUpdateViews }); } diff --git a/src/components/middle/message/ActionMessage.tsx b/src/components/middle/message/ActionMessage.tsx index 37721d0e7..93388177a 100644 --- a/src/components/middle/message/ActionMessage.tsx +++ b/src/components/middle/message/ActionMessage.tsx @@ -102,6 +102,7 @@ type StateProps = { isCurrentUserPremium?: boolean; isInSelectMode?: boolean; hasUnreadReaction?: boolean; + hasUnreadPollVote?: boolean; isResizingContainer?: boolean; scrollTargetPosition?: ScrollTargetPosition; isAccountFrozen?: boolean; @@ -140,6 +141,7 @@ const ActionMessage = ({ isCurrentUserPremium, isInSelectMode, hasUnreadReaction, + hasUnreadPollVote, isResizingContainer, scrollTargetPosition, isAccountFrozen, @@ -161,6 +163,7 @@ const ActionMessage = ({ toggleChannelRecommendations, animateUnreadReaction, markMentionsRead, + markPollVotesRead, focusMessage, openGiftOfferAcceptModal, declineStarGiftOffer, @@ -335,10 +338,22 @@ const ActionMessage = ({ animateUnreadReaction({ chatId, messageIds: [id] }); } + if (hasUnreadPollVote) { + markPollVotesRead({ chatId, messageIds: [id] }); + } + if (message.hasUnreadMention) { markMentionsRead({ chatId, messageIds: [id] }); } - }, [hasUnreadReaction, chatId, id, animateUnreadReaction, message.hasUnreadMention]); + }, [ + hasUnreadReaction, + hasUnreadPollVote, + chatId, + id, + animateUnreadReaction, + markPollVotesRead, + message.hasUnreadMention, + ]); useEffect(() => { if (action.type !== 'giftPremium') return; @@ -619,6 +634,7 @@ const ActionMessage = ({ data-message-id={message.id} data-is-pinned={message.isPinned || undefined} data-has-unread-mention={message.hasUnreadMention || undefined} + data-has-unread-poll-vote={hasUnreadPollVote || undefined} data-has-unread-reaction={hasUnreadReaction || undefined} onMouseDown={handleMouseDown} onContextMenu={handleContextMenu} @@ -737,6 +753,7 @@ export default memo(withGlobal( const readState = selectThreadReadState(global, message.chatId, threadId); const hasUnreadReaction = readState?.unreadReactions?.includes(message.id); + const hasUnreadPollVote = readState?.unreadPollVotes?.includes(message.id); const isAccountFrozen = selectIsCurrentUserFrozen(global); return { @@ -751,6 +768,7 @@ export default memo(withGlobal( isInSelectMode: selectIsInSelectMode(global), actionMessageBg: selectActionMessageBg(global), hasUnreadReaction, + hasUnreadPollVote, isResizingContainer, scrollTargetPosition, isAccountFrozen, diff --git a/src/components/middle/message/Message.tsx b/src/components/middle/message/Message.tsx index 3ccdfb595..fa3ae2f49 100644 --- a/src/components/middle/message/Message.tsx +++ b/src/components/middle/message/Message.tsx @@ -301,6 +301,7 @@ type StateProps = { defaultReaction?: ApiReaction; activeEmojiInteractions?: ActiveEmojiInteraction[]; hasUnreadReaction?: boolean; + hasUnreadPollVote?: boolean; isTranscribing?: boolean; transcribedText?: string; isPremium: boolean; @@ -431,6 +432,7 @@ const Message = ({ autoLoadFileMaxSizeMb, repliesThreadInfo, hasUnreadReaction, + hasUnreadPollVote, memoFirstUnreadIdRef, senderChatMember, messageTopic, @@ -478,6 +480,7 @@ const Message = ({ animateUnreadReaction, focusMessage, markMentionsRead, + markPollVotesRead, openThread, summarizeMessage, } = getActions(); @@ -963,6 +966,10 @@ const Message = ({ animateUnreadReaction({ chatId, messageIds: [messageId] }); } + if (hasUnreadPollVote) { + markPollVotesRead({ chatId, messageIds: [messageId] }); + } + let unreadMentionIds: number[] = []; if (message.hasUnreadMention) { unreadMentionIds = [messageId]; @@ -975,7 +982,16 @@ const Message = ({ if (unreadMentionIds.length) { markMentionsRead({ chatId, messageIds: unreadMentionIds }); } - }, [hasUnreadReaction, album, chatId, messageId, animateUnreadReaction, message.hasUnreadMention]); + }, [ + hasUnreadReaction, + hasUnreadPollVote, + album, + chatId, + messageId, + animateUnreadReaction, + markPollVotesRead, + message.hasUnreadMention, + ]); const albumLayout = useMemo(() => { return isAlbum @@ -1848,6 +1864,7 @@ const Message = ({ data-last-message-id={album ? album.messages[album.messages.length - 1].id : undefined} data-album-main-id={album ? album.mainMessage.id : undefined} data-has-unread-mention={message.hasUnreadMention || undefined} + data-has-unread-poll-vote={hasUnreadPollVote || undefined} data-has-unread-reaction={hasUnreadReaction || undefined} data-is-pinned={isPinned || undefined} data-should-update-views={message.viewsCount !== undefined} @@ -2123,6 +2140,7 @@ export default memo(withGlobal( const readState = selectThreadReadState(global, chatId, threadId); const hasUnreadReaction = readState?.unreadReactions?.includes(message.id); + const hasUnreadPollVote = readState?.unreadPollVotes?.includes(message.id); const hasTopicChip = threadId === MAIN_THREAD_ID && chat?.isForum && !chat.isBotForum && isFirstInGroup; const messageTopic = selectTopicFromMessage(global, message); @@ -2220,6 +2238,7 @@ export default memo(withGlobal( hasActiveReactions, activeEmojiInteractions, hasUnreadReaction, + hasUnreadPollVote, isTranscribing: transcriptionId !== undefined && global.transcriptions[transcriptionId]?.isPending, transcribedText: transcriptionId !== undefined ? global.transcriptions[transcriptionId]?.text : undefined, isPremium, diff --git a/src/config.ts b/src/config.ts index b529bb30c..744b4a157 100644 --- a/src/config.ts +++ b/src/config.ts @@ -116,6 +116,7 @@ export const GLOBAL_SUGGESTED_CHANNELS_ID = 'global'; // https://github.com/DrKLO/Telegram/blob/51e9947527/TMessagesProj/src/main/java/org/telegram/messenger/MediaDataController.java#L7781 export const REACTION_UNREAD_SLICE = 100; export const MENTION_UNREAD_SLICE = 100; +export const POLL_UNREAD_SLICE = 100; export const TOPICS_SLICE = 20; export const TOPICS_SLICE_SECOND_LOAD = 500; diff --git a/src/global/actions/api/chats.ts b/src/global/actions/api/chats.ts index 2994e7d8d..4a08fac11 100644 --- a/src/global/actions/api/chats.ts +++ b/src/global/actions/api/chats.ts @@ -1461,6 +1461,7 @@ addActionHandler('markChatMessagesRead', async (global, actions, payload): Promi await callApi('markMessageListRead', { chat, threadId: MAIN_THREAD_ID }); actions.readAllMentions({ chatId: id }); actions.readAllReactions({ chatId: id }); + actions.readAllPollVotes({ chatId: id }); if (chatReadState?.hasUnreadMark) { actions.markChatRead({ id }); } @@ -1487,7 +1488,13 @@ addActionHandler('markChatMessagesRead', async (global, actions, payload): Promi global = updateTopicWithState(global, id, topicWithState); const { readState } = topicWithState; - if (readState && !readState.unreadCount && !readState.unreadMentionsCount && !readState.unreadReactionsCount) { + if ( + readState + && !readState.unreadCount + && !readState.unreadMentionsCount + && !readState.unreadReactionsCount + && !readState.unreadPollVotesCount + ) { return; } @@ -1530,6 +1537,7 @@ addActionHandler('markTopicRead', (global, actions, payload): ActionReturnType = }); actions.readAllMentions({ chatId, threadId: topicId }); actions.readAllReactions({ chatId, threadId: topicId }); + actions.readAllPollVotes({ chatId, threadId: topicId }); global = getGlobal(); global = replaceThreadReadStateParam(global, chatId, topicId, 'lastReadInboxMessageId', lastTopicMessageId); diff --git a/src/global/actions/api/messages.ts b/src/global/actions/api/messages.ts index 45d05e839..87c3d9c44 100644 --- a/src/global/actions/api/messages.ts +++ b/src/global/actions/api/messages.ts @@ -81,12 +81,12 @@ import { } from '../../index'; import { addChatMessagesById, - addUnreadMentions, clearMessageSummary, deleteSponsoredMessage, removeOutlyingList, removeRequestedMessageTranslation, removeUnreadMentions, + removeUnreadPollVotes, replaceSettings, replaceUserStatuses, safeReplacePinnedIds, @@ -106,6 +106,7 @@ import { updateScheduledMessages, updateSponsoredMessage, updateTopicWithState, + updateUnreadCounters, updateUploadByMessageKey, updateUserFullInfo, } from '../../reducers'; @@ -172,7 +173,6 @@ import { selectThreadReadState, } from '../../selectors/threads'; import { deleteMessages, updateWithLocalMedia } from '../apiUpdaters/messages'; - const AUTOLOGIN_TOKEN_KEY = 'autologin_token'; const uploadProgressCallbacks = new Map(); @@ -2287,19 +2287,45 @@ addActionHandler('loadUnreadMentions', async (global, actions, payload): Promise const { messages, topics, totalCount } = result; - const byId = buildCollectionByKey(messages, 'id'); - const ids = Object.keys(byId).map(Number); - global = getGlobal(); - global = addChatMessagesById(global, chat.id, byId); - topics.forEach((topicState) => { - global = updateTopicWithState(global, chat.id, topicState); - }); - global = addUnreadMentions({ + global = updateUnreadCounters({ global, chatId, - ids, + threadId, + messages, + topics, totalCount, + unreadCountKey: 'unreadMentionsCount', + }); + + setGlobal(global); +}); + +addActionHandler('loadUnreadPollVotes', async (global, actions, payload): Promise => { + const { chatId, threadId = MAIN_THREAD_ID, offsetId } = payload; + + const chat = selectChat(global, chatId); + if (!chat) return; + + const result = await callApi('fetchUnreadPollVotes', { + chat, + threadId: threadId !== MAIN_THREAD_ID ? threadId : undefined, + offsetId, + }); + + if (!result) return; + + const { messages, topics, totalCount } = result; + + global = getGlobal(); + global = updateUnreadCounters({ + global, + chatId, + threadId, + messages, + topics, + totalCount, + unreadCountKey: 'unreadPollVotesCount', }); setGlobal(global); @@ -2391,6 +2417,21 @@ addActionHandler('markMentionsRead', (global, actions, payload): ActionReturnTyp actions.markMessagesRead({ chatId, messageIds }); }); +addActionHandler('markPollVotesRead', (global, actions, payload): ActionReturnType => { + const { chatId, messageIds } = payload; + const chat = selectChat(global, chatId); + if (!chat) return; + + global = removeUnreadPollVotes({ + global, + chatId, + ids: messageIds, + }); + setGlobal(global); + + actions.markMessagesRead({ chatId, messageIds }); +}); + addActionHandler('focusNextMention', async (global, actions, payload): Promise => { const { chatId, threadId = MAIN_THREAD_ID, tabId = getCurrentTabId() } = payload; @@ -2407,6 +2448,28 @@ addActionHandler('focusNextMention', async (global, actions, payload): Promise => { + const { chatId, threadId = MAIN_THREAD_ID, tabId = getCurrentTabId() } = payload; + + let readState = selectThreadReadState(global, chatId, threadId); + + if (!readState?.unreadPollVotes?.length) { + await getPromiseActions().loadUnreadPollVotes({ chatId, threadId }); + + global = getGlobal(); + readState = selectThreadReadState(global, chatId, threadId); + if (!readState?.unreadPollVotes?.length) return; + } + + actions.focusMessage({ + chatId, + threadId, + messageId: readState.unreadPollVotes[0], + tabId, + scrollTargetPosition: 'end', + }); +}); + addActionHandler('readAllMentions', (global, actions, payload): ActionReturnType => { const { chatId, threadId = MAIN_THREAD_ID } = payload; @@ -2422,6 +2485,21 @@ addActionHandler('readAllMentions', (global, actions, payload): ActionReturnType return global; }); +addActionHandler('readAllPollVotes', (global, actions, payload): ActionReturnType => { + const { chatId, threadId = MAIN_THREAD_ID } = payload; + + const chat = selectChat(global, chatId); + if (!chat) return undefined; + + callApi('readAllPollVotes', { chat, threadId: threadId !== MAIN_THREAD_ID ? threadId : undefined }); + + global = updateThreadReadState(global, chatId, threadId, { + unreadPollVotesCount: 0, + unreadPollVotes: undefined, + }); + return global; +}); + addActionHandler('openUrl', (global, actions, payload): ActionReturnType => { const { url, shouldSkipModal, ignoreDeepLinks, linkContext, tabId = getCurrentTabId(), diff --git a/src/global/actions/api/reactions.ts b/src/global/actions/api/reactions.ts index a8e4caf2e..a4f58f31b 100644 --- a/src/global/actions/api/reactions.ts +++ b/src/global/actions/api/reactions.ts @@ -1,6 +1,11 @@ -import type { ApiError, ApiReaction, ApiReactionEmoji } from '../../../api/types'; import type { ActionReturnType } from '../../types'; -import { ApiMediaFormat, MAIN_THREAD_ID } from '../../../api/types'; +import { + type ApiError, + ApiMediaFormat, + type ApiReaction, + type ApiReactionEmoji, + MAIN_THREAD_ID, +} from '../../../api/types'; import { GENERAL_REFETCH_INTERVAL } from '../../../config'; import { getCurrentTabId } from '../../../util/establishMultitabRole'; @@ -21,13 +26,11 @@ import { } from '../../helpers'; import { addActionHandler, getGlobal, getPromiseActions, setGlobal } from '../../index'; import { - addChatMessagesById, updateChatMessage, - updateTopicWithState, + updateUnreadCounters, } from '../../reducers'; import { addMessageReaction, - addUnreadReactions, removeUnreadReactions, subtractXForEmojiInteraction, } from '../../reducers/reactions'; @@ -490,19 +493,15 @@ addActionHandler('loadUnreadReactions', async (global, actions, payload): Promis const { messages, topics, totalCount } = result; - const byId = buildCollectionByKey(messages, 'id'); - const ids = Object.keys(byId).map(Number); - global = getGlobal(); - global = addChatMessagesById(global, chat.id, byId); - topics.forEach((topicState) => { - global = updateTopicWithState(global, chat.id, topicState); - }); - global = addUnreadReactions({ + global = updateUnreadCounters({ global, chatId, - ids, + threadId, + messages, + topics, totalCount, + unreadCountKey: 'unreadReactionsCount', }); setGlobal(global); diff --git a/src/global/reducers/chats.ts b/src/global/reducers/chats.ts index 3f9dc9d5d..2dabbd9b2 100644 --- a/src/global/reducers/chats.ts +++ b/src/global/reducers/chats.ts @@ -8,12 +8,11 @@ import { import { ARCHIVED_FOLDER_ID } from '../../config'; import { areDeepEqual } from '../../util/areDeepEqual'; import { - areSortedArraysEqual, buildCollectionByKey, omit, omitUndefined, pick, unique, + areSortedArraysEqual, buildCollectionByKey, omit, omitUndefined, pick, } from '../../util/iteratees'; -import { groupMessageIdsByThreadId } from '../helpers'; import { selectChatFullInfo } from '../selectors'; -import { selectThreadReadState } from '../selectors/threads'; -import { replaceThreadReadStateParam, updateThreadInfoLastMessageId } from './threads'; +import { updateThreadInfoLastMessageId } from './threads'; +import { addUnreadCount, removeUnreadCount } from './unreadCounters'; const DEFAULT_CHAT_LISTS: ChatListType[] = ['active', 'archived']; @@ -132,28 +131,13 @@ export function addUnreadMentions({ ids: number[]; totalCount?: number; }): T { - const messageIdsByThreadId = groupMessageIdsByThreadId(global, chatId, ids, false); - - for (const threadId in messageIdsByThreadId) { - const messageIds = messageIdsByThreadId[threadId]; - if (totalCount !== undefined) { // Assume that when `totalCount` is passed, server returned full id list - global = replaceThreadReadStateParam(global, chatId, threadId, 'unreadMentions', messageIds); - global = replaceThreadReadStateParam(global, chatId, threadId, 'unreadMentionsCount', totalCount); - continue; - } - - const readState = selectThreadReadState(global, chatId, threadId); - const prevChatUnreadMentions = readState?.unreadMentions || []; - const updatedUnreadMentions = unique([...prevChatUnreadMentions, ...messageIds]).sort((a, b) => b - a); - global = replaceThreadReadStateParam(global, chatId, threadId, 'unreadMentions', updatedUnreadMentions); - - const updatedUnreadMentionsCount = (readState?.unreadMentionsCount || 0) - + Math.max(0, updatedUnreadMentions.length - prevChatUnreadMentions.length); - - global = replaceThreadReadStateParam(global, chatId, threadId, 'unreadMentionsCount', updatedUnreadMentionsCount); - } - - return global; + return addUnreadCount({ + global, + chatId, + messageIds: ids, + totalCount, + unreadCountKey: 'unreadMentionsCount', + }); } export function removeUnreadMentions({ @@ -163,24 +147,12 @@ export function removeUnreadMentions({ chatId: string; ids: number[]; }): T { - const messageIdsByThreadId = groupMessageIdsByThreadId(global, chatId, ids, false); - - for (const threadId in messageIdsByThreadId) { - const messageIds = messageIdsByThreadId[threadId]; - const readState = selectThreadReadState(global, chatId, threadId); - const prevChatUnreadMentions = (readState?.unreadMentions || []); - const updatedUnreadMentions = prevChatUnreadMentions?.filter((id) => !messageIds.includes(id)); - - global = replaceThreadReadStateParam(global, chatId, threadId, 'unreadMentions', updatedUnreadMentions); - - const removedCount = prevChatUnreadMentions.length - updatedUnreadMentions.length; - if (removedCount && readState?.unreadMentionsCount) { - const updatedUnreadMentionsCount = Math.max(readState.unreadMentionsCount - removedCount, 0); - - global = replaceThreadReadStateParam(global, chatId, threadId, 'unreadMentionsCount', updatedUnreadMentionsCount); - } - } - return global; + return removeUnreadCount({ + global, + chatId, + messageIds: ids, + unreadCountKey: 'unreadMentionsCount', + }); } export function updateChat( diff --git a/src/global/reducers/index.ts b/src/global/reducers/index.ts index 261898931..56e67c07e 100644 --- a/src/global/reducers/index.ts +++ b/src/global/reducers/index.ts @@ -2,6 +2,7 @@ export * from './chats'; export * from './messages'; export * from './symbols'; export * from './users'; +export * from './unreadCounters'; export * from './globalSearch'; export * from './middleSearch'; export * from './management'; @@ -13,5 +14,6 @@ export * from './statistics'; export * from './stories'; export * from './translations'; export * from './peers'; +export * from './polls'; export * from './topics'; export * from './gifts'; diff --git a/src/global/reducers/messages.ts b/src/global/reducers/messages.ts index 87028a5e0..5c8e362d0 100644 --- a/src/global/reducers/messages.ts +++ b/src/global/reducers/messages.ts @@ -52,6 +52,7 @@ import { import { selectThreadIdFromMessage, selectThreadInfo, selectThreadLocalStateParam } from '../selectors/threads'; import { removeUnreadMentions } from './chats'; import { removeIdFromSearchResults } from './middleSearch'; +import { removeUnreadPollVotes } from './polls'; import { removeUnreadReactions } from './reactions'; import { updateTabState } from './tabs'; import { @@ -437,6 +438,7 @@ export function deleteChatMessages( global = removeUnreadReactions({ global, chatId, ids: messageIds }); global = removeUnreadMentions({ global, chatId, ids: messageIds }); + global = removeUnreadPollVotes({ global, chatId, ids: messageIds }); const newById = omit(byId, messageIds); global = replaceChatMessages(global, chatId, newById); diff --git a/src/global/reducers/polls.ts b/src/global/reducers/polls.ts new file mode 100644 index 000000000..cdf69d827 --- /dev/null +++ b/src/global/reducers/polls.ts @@ -0,0 +1,35 @@ +import type { GlobalState } from '../types'; + +import { addUnreadCount, removeUnreadCount } from './unreadCounters'; + +export function addUnreadPollVotes({ + global, chatId, ids, totalCount, +}: { + global: T; + chatId: string; + ids: number[]; + totalCount?: number; +}): T { + return addUnreadCount({ + global, + chatId, + messageIds: ids, + totalCount, + unreadCountKey: 'unreadPollVotesCount', + }); +} + +export function removeUnreadPollVotes({ + global, chatId, ids, +}: { + global: T; + chatId: string; + ids: number[]; +}): T { + return removeUnreadCount({ + global, + chatId, + messageIds: ids, + unreadCountKey: 'unreadPollVotesCount', + }); +} diff --git a/src/global/reducers/reactions.ts b/src/global/reducers/reactions.ts index 1c25651c9..788896452 100644 --- a/src/global/reducers/reactions.ts +++ b/src/global/reducers/reactions.ts @@ -2,17 +2,15 @@ import type { GlobalState } from '../types'; import { type ApiMessage, type ApiReactionWithPaid } from '../../api/types'; import { MIN_SCREEN_WIDTH_FOR_STATIC_LEFT_COLUMN, MIN_SCREEN_WIDTH_FOR_STATIC_RIGHT_COLUMN } from '../../config'; -import { unique } from '../../util/iteratees'; import windowSize from '../../util/windowSize'; import { MIN_LEFT_COLUMN_WIDTH, SIDE_COLUMN_MAX_WIDTH, } from '../../components/middle/helpers/calculateMiddleFooterTransforms'; -import { groupMessageIdsByThreadId, updateReactionCount } from '../helpers'; +import { updateReactionCount } from '../helpers'; import { selectIsChatWithSelf, selectSendAs, selectTabState } from '../selectors'; -import { selectThreadReadState } from '../selectors/threads'; import { updateChatMessage } from './messages'; -import { replaceThreadReadStateParam } from './threads'; +import { addUnreadCount, removeUnreadCount } from './unreadCounters'; import { getIsMobile } from '../../hooks/useAppLayout'; @@ -85,29 +83,13 @@ export function addUnreadReactions({ ids: number[]; totalCount?: number; }): T { - const messageIdsByThreadId = groupMessageIdsByThreadId(global, chatId, ids, false); - - for (const threadId in messageIdsByThreadId) { - const messageIds = messageIdsByThreadId[threadId]; - if (totalCount !== undefined) { // Assume that when `totalCount` is passed, server returned full id list - global = replaceThreadReadStateParam(global, chatId, threadId, 'unreadReactions', messageIds); - global = replaceThreadReadStateParam(global, chatId, threadId, 'unreadReactionsCount', totalCount); - continue; - } - - const readState = selectThreadReadState(global, chatId, threadId); - const prevChatUnreadReactions = readState?.unreadReactions || []; - const updatedUnreadReactions = unique([...prevChatUnreadReactions, ...messageIds]).sort((a, b) => b - a); - global = replaceThreadReadStateParam(global, chatId, threadId, 'unreadReactions', updatedUnreadReactions); - - const delta = updatedUnreadReactions.length - prevChatUnreadReactions.length; - if (delta > 0) { - const unreadReactionsCount = (readState?.unreadReactionsCount || 0) + delta; - global = replaceThreadReadStateParam(global, chatId, threadId, 'unreadReactionsCount', unreadReactionsCount); - } - } - - return global; + return addUnreadCount({ + global, + chatId, + messageIds: ids, + totalCount, + unreadCountKey: 'unreadReactionsCount', + }); } export function removeUnreadReactions({ @@ -117,20 +99,10 @@ export function removeUnreadReactions({ chatId: string; ids: number[]; }): T { - const messageIdsByThreadId = groupMessageIdsByThreadId(global, chatId, ids, false); - - for (const threadId in messageIdsByThreadId) { - const messageIds = messageIdsByThreadId[threadId]; - const readState = selectThreadReadState(global, chatId, threadId); - const prevChatUnreadReactions = readState?.unreadReactions || []; - const updatedUnreadReactions = prevChatUnreadReactions.filter((id) => !messageIds.includes(id)); - global = replaceThreadReadStateParam(global, chatId, threadId, 'unreadReactions', updatedUnreadReactions); - - const delta = prevChatUnreadReactions.length - updatedUnreadReactions.length; - if (delta > 0 && readState?.unreadReactionsCount) { - const unreadReactionsCount = Math.max(readState.unreadReactionsCount - delta, 0); - global = replaceThreadReadStateParam(global, chatId, threadId, 'unreadReactionsCount', unreadReactionsCount); - } - } - return global; + return removeUnreadCount({ + global, + chatId, + messageIds: ids, + unreadCountKey: 'unreadReactionsCount', + }); } diff --git a/src/global/reducers/unreadCounters.ts b/src/global/reducers/unreadCounters.ts new file mode 100644 index 000000000..6946a0a2c --- /dev/null +++ b/src/global/reducers/unreadCounters.ts @@ -0,0 +1,170 @@ +import type { ApiMessage, ApiTopicWithState } from '../../api/types'; +import type { ThreadId, ThreadReadState } from '../../types'; +import type { GlobalState } from '../types'; + +import { buildCollectionByKey, unique } from '../../util/iteratees'; +import { groupMessageIdsByThreadId } from '../helpers'; +import { selectThreadReadState } from '../selectors/threads'; +import { addChatMessagesById } from './messages'; +import { replaceThreadReadStateParam } from './threads'; +import { updateTopicWithState } from './topics'; + +type UnreadCountIdsKey = 'unreadMentions' | 'unreadReactions' | 'unreadPollVotes'; +export type UnreadCountKey = 'unreadMentionsCount' | 'unreadReactionsCount' | 'unreadPollVotesCount'; + +type AddUnreadCountArgs = { + global: T; + chatId: string; + messageIds: number[]; + totalCount?: number; + unreadCountKey: TKey; +}; + +type RemoveUnreadCountArgs = { + global: T; + chatId: string; + messageIds: number[]; + unreadCountKey: TKey; +}; + +type UpdateUnreadCountersArgs = { + global: T; + chatId: string; + threadId: ThreadId; + messages: ApiMessage[]; + topics: ApiTopicWithState[]; + totalCount: number; + unreadCountKey: TKey; +}; + +const unreadIdsKeyByCountKey = { + unreadMentionsCount: 'unreadMentions', + unreadReactionsCount: 'unreadReactions', + unreadPollVotesCount: 'unreadPollVotes', +} satisfies Record; + +function getUnreadIdsKey(unreadCountKey: TKey) { + return unreadIdsKeyByCountKey[unreadCountKey]; +} + +function replaceThreadUnreadIds( + global: T, + chatId: string, + threadId: ThreadId, + unreadCountKey: TKey, + messageIds: number[] | undefined, +) { + return replaceThreadReadStateParam(global, chatId, threadId, getUnreadIdsKey(unreadCountKey), messageIds); +} + +function replaceThreadUnreadCount( + global: T, + chatId: string, + threadId: ThreadId, + unreadCountKey: TKey, + count: number | undefined, +) { + return replaceThreadReadStateParam(global, chatId, threadId, unreadCountKey, count); +} + +function selectThreadUnreadIds( + readState: ThreadReadState | undefined, + unreadCountKey: TKey, +) { + return readState?.[getUnreadIdsKey(unreadCountKey)]; +} + +export function addUnreadCount({ + global, + chatId, + messageIds, + totalCount, + unreadCountKey, +}: AddUnreadCountArgs): T { + const messageIdsByThreadId = groupMessageIdsByThreadId(global, chatId, messageIds, false); + + for (const threadId in messageIdsByThreadId) { + const threadMessageIds = messageIdsByThreadId[threadId]; + if (totalCount !== undefined) { + global = replaceThreadUnreadIds(global, chatId, threadId, unreadCountKey, threadMessageIds); + global = replaceThreadUnreadCount(global, chatId, threadId, unreadCountKey, totalCount); + continue; + } + + const readState = selectThreadReadState(global, chatId, threadId); + const previousIds = selectThreadUnreadIds(readState, unreadCountKey) || []; + const updatedIds = unique([...previousIds, ...threadMessageIds]).sort((a, b) => b - a); + + global = replaceThreadUnreadIds(global, chatId, threadId, unreadCountKey, updatedIds); + + const delta = updatedIds.length - previousIds.length; + if (delta > 0) { + global = replaceThreadUnreadCount( + global, + chatId, + threadId, + unreadCountKey, + (readState?.[unreadCountKey] || 0) + delta, + ); + } + } + + return global; +} + +export function removeUnreadCount({ + global, + chatId, + messageIds, + unreadCountKey, +}: RemoveUnreadCountArgs): T { + const messageIdsByThreadId = groupMessageIdsByThreadId(global, chatId, messageIds, false); + + for (const threadId in messageIdsByThreadId) { + const threadMessageIds = messageIdsByThreadId[threadId]; + const threadMessageIdSet = new Set(threadMessageIds); + const readState = selectThreadReadState(global, chatId, threadId); + const previousIds = selectThreadUnreadIds(readState, unreadCountKey) || []; + const updatedIds = previousIds.filter((id) => !threadMessageIdSet.has(id)); + + global = replaceThreadUnreadIds(global, chatId, threadId, unreadCountKey, updatedIds); + + const previousCount = readState?.[unreadCountKey]; + const delta = previousIds.length - updatedIds.length; + + if (delta > 0 && previousCount) { + global = replaceThreadUnreadCount( + global, + chatId, + threadId, + unreadCountKey, + Math.max(previousCount - delta, 0), + ); + } + } + + return global; +} + +export function updateUnreadCounters({ + global, + chatId, + threadId, + messages, + topics, + totalCount, + unreadCountKey, +}: UpdateUnreadCountersArgs): T { + const messagesById = buildCollectionByKey(messages, 'id'); + + global = addChatMessagesById(global, chatId, messagesById); + topics.forEach((topicState) => { + global = updateTopicWithState(global, chatId, topicState); + }); + + const messageIds = Object.keys(messagesById).map(Number).sort((a, b) => b - a); + global = replaceThreadUnreadIds(global, chatId, threadId, unreadCountKey, messageIds); + global = replaceThreadUnreadCount(global, chatId, threadId, unreadCountKey, totalCount); + + return global; +} diff --git a/src/global/types/actions.ts b/src/global/types/actions.ts index 2362bcbff..e8096708f 100644 --- a/src/global/types/actions.ts +++ b/src/global/types/actions.ts @@ -1434,6 +1434,11 @@ export interface ActionPayloads { threadId?: ThreadId; offsetId?: number; }; + loadUnreadPollVotes: { + chatId: string; + threadId?: ThreadId; + offsetId?: number; + }; scheduleForViewsIncrement: { chatId: string; ids: number[]; @@ -1468,6 +1473,10 @@ export interface ActionPayloads { chatId: string; threadId?: ThreadId; } & WithTabId; + focusNextPollVote: { + chatId: string; + threadId?: ThreadId; + } & WithTabId; readAllReactions: { chatId: string; threadId?: ThreadId; @@ -1476,10 +1485,18 @@ export interface ActionPayloads { chatId: string; threadId?: ThreadId; }; + readAllPollVotes: { + chatId: string; + threadId?: ThreadId; + }; markMentionsRead: { chatId: string; messageIds: number[]; }; + markPollVotesRead: { + chatId: string; + messageIds: number[]; + }; copyMessageLink: { chatId: string; messageId: number; diff --git a/src/lib/gramjs/tl/apiTl.ts b/src/lib/gramjs/tl/apiTl.ts index a030b51c5..05c820fff 100644 --- a/src/lib/gramjs/tl/apiTl.ts +++ b/src/lib/gramjs/tl/apiTl.ts @@ -1812,6 +1812,8 @@ messages.editChatParticipantRank#a00f32b0 peer:InputPeer participant:InputPeer r messages.declineUrlAuth#35436bbc url:string = Bool; messages.checkUrlAuthMatchCode#c9a47b0b url:string match_code:string = Bool; messages.composeMessageWithAI#fd426afe flags:# proofread:flags.0?true emojify:flags.3?true text:TextWithEntities translate_to_lang:flags.1?string change_tone:flags.2?string = messages.ComposedMessageWithAI; +messages.getUnreadPollVotes#43286cf2 flags:# peer:InputPeer top_msg_id:flags.0?int offset_id:int add_offset:int limit:int max_id:int min_id:int = messages.Messages; +messages.readPollVotes#1720b4d8 flags:# peer:InputPeer top_msg_id:flags.0?int = messages.AffectedHistory; updates.getState#edd4882a = updates.State; updates.getDifference#19c2f763 flags:# pts:int pts_limit:flags.1?int pts_total_limit:flags.0?int date:int qts:int qts_limit:flags.2?int = updates.Difference; updates.getChannelDifference#3173d78 flags:# force:flags.0?true channel:InputChannel filter:ChannelMessagesFilter pts:int limit:int = updates.ChannelDifference; diff --git a/src/lib/gramjs/tl/static/api.json b/src/lib/gramjs/tl/static/api.json index 6fa07a5d0..9676cdd50 100644 --- a/src/lib/gramjs/tl/static/api.json +++ b/src/lib/gramjs/tl/static/api.json @@ -224,6 +224,8 @@ "messages.clearRecentReactions", "messages.readMentions", "messages.getUnreadMentions", + "messages.readPollVotes", + "messages.getUnreadPollVotes", "messages.getSavedDialogs", "messages.getSavedHistory", "messages.deleteSavedHistory", diff --git a/src/styles/icons.css b/src/styles/icons.css index 91f611364..fac05b72b 100644 --- a/src/styles/icons.css +++ b/src/styles/icons.css @@ -3,8 +3,8 @@ font-weight: normal; font-style: normal; font-display: block; - src: url("./icons.woff2?c214ea51ec224c3d83b4001c0c6e5d71") format("woff2"), -url("./icons.woff?c214ea51ec224c3d83b4001c0c6e5d71") format("woff"); + src: url("./icons.woff2?57b8d316ef753822e8b48b5185869a06") format("woff2"), +url("./icons.woff?57b8d316ef753822e8b48b5185869a06") format("woff"); } .icon-char::before { @@ -45,981 +45,975 @@ url("./icons.woff?c214ea51ec224c3d83b4001c0c6e5d71") format("woff"); .icon-admin::before { content: "\f108"; } -.icon-ai-edit::before { +.icon-allow-share::before { content: "\f109"; } -.icon-ai-fix::before { +.icon-allow-speak::before { content: "\f10a"; } -.icon-ai::before { +.icon-animals::before { content: "\f10b"; } -.icon-allow-share::before { +.icon-animations::before { content: "\f10c"; } -.icon-allow-speak::before { +.icon-archive-filled::before { content: "\f10d"; } -.icon-animals::before { +.icon-archive-from-main::before { content: "\f10e"; } -.icon-animations::before { +.icon-archive-to-main::before { content: "\f10f"; } -.icon-archive-filled::before { +.icon-archive::before { content: "\f110"; } -.icon-archive-from-main::before { +.icon-arrow-down-circle::before { content: "\f111"; } -.icon-archive-to-main::before { +.icon-arrow-down::before { content: "\f112"; } -.icon-archive::before { +.icon-arrow-left::before { content: "\f113"; } -.icon-arrow-down-circle::before { +.icon-arrow-right::before { content: "\f114"; } -.icon-arrow-down::before { +.icon-ask-support::before { content: "\f115"; } -.icon-arrow-left::before { +.icon-attach::before { content: "\f116"; } -.icon-arrow-right::before { +.icon-auction-drop::before { content: "\f117"; } -.icon-ask-support::before { +.icon-auction-filled::before { content: "\f118"; } -.icon-attach::before { +.icon-auction-next-round::before { content: "\f119"; } -.icon-auction-drop::before { +.icon-auction::before { content: "\f11a"; } -.icon-auction-filled::before { +.icon-author-hidden::before { content: "\f11b"; } -.icon-auction-next-round::before { +.icon-avatar-archived-chats::before { content: "\f11c"; } -.icon-auction::before { +.icon-avatar-deleted-account::before { content: "\f11d"; } -.icon-author-hidden::before { +.icon-avatar-saved-messages::before { content: "\f11e"; } -.icon-avatar-archived-chats::before { +.icon-bold::before { content: "\f11f"; } -.icon-avatar-deleted-account::before { +.icon-boost-craft-chance::before { content: "\f120"; } -.icon-avatar-saved-messages::before { +.icon-boost-outline::before { content: "\f121"; } -.icon-bold::before { +.icon-boost::before { content: "\f122"; } -.icon-boost-craft-chance::before { +.icon-boostcircle::before { content: "\f123"; } -.icon-boost-outline::before { +.icon-boosts::before { content: "\f124"; } -.icon-boost::before { +.icon-bot-command::before { content: "\f125"; } -.icon-boostcircle::before { +.icon-bot-commands-filled::before { content: "\f126"; } -.icon-boosts::before { +.icon-bots::before { content: "\f127"; } -.icon-bot-command::before { +.icon-brush::before { content: "\f128"; } -.icon-bot-commands-filled::before { +.icon-bug::before { content: "\f129"; } -.icon-bots::before { +.icon-calendar-filter::before { content: "\f12a"; } -.icon-brush::before { +.icon-calendar::before { content: "\f12b"; } -.icon-bug::before { +.icon-camera-add::before { content: "\f12c"; } -.icon-calendar-filter::before { +.icon-camera::before { content: "\f12d"; } -.icon-calendar::before { +.icon-car::before { content: "\f12e"; } -.icon-camera-add::before { +.icon-card::before { content: "\f12f"; } -.icon-camera::before { +.icon-cash-circle::before { content: "\f130"; } -.icon-car::before { +.icon-channel-filled::before { content: "\f131"; } -.icon-card::before { +.icon-channel::before { content: "\f132"; } -.icon-cash-circle::before { +.icon-channelviews::before { content: "\f133"; } -.icon-channel-filled::before { +.icon-chat-badge::before { content: "\f134"; } -.icon-channel::before { +.icon-chats-badge::before { content: "\f135"; } -.icon-channelviews::before { +.icon-check-bold::before { content: "\f136"; } -.icon-chat-badge::before { +.icon-check::before { content: "\f137"; } -.icon-chats-badge::before { +.icon-clock-edit::before { content: "\f138"; } -.icon-check-bold::before { +.icon-clock::before { content: "\f139"; } -.icon-check::before { +.icon-close-circle::before { content: "\f13a"; } -.icon-clock-edit::before { +.icon-close-topic::before { content: "\f13b"; } -.icon-clock::before { +.icon-close::before { content: "\f13c"; } -.icon-close-circle::before { +.icon-closed-gift::before { content: "\f13d"; } -.icon-close-topic::before { +.icon-cloud-download::before { content: "\f13e"; } -.icon-close::before { +.icon-collapse-modal::before { content: "\f13f"; } -.icon-closed-gift::before { +.icon-collapse::before { content: "\f140"; } -.icon-cloud-download::before { +.icon-colorize::before { content: "\f141"; } -.icon-collapse-modal::before { +.icon-combine-craft::before { content: "\f142"; } -.icon-collapse::before { +.icon-comments-sticker::before { content: "\f143"; } -.icon-colorize::before { +.icon-comments::before { content: "\f144"; } -.icon-combine-craft::before { +.icon-copy-media::before { content: "\f145"; } -.icon-comments-sticker::before { +.icon-copy::before { content: "\f146"; } -.icon-comments::before { +.icon-craft::before { content: "\f147"; } -.icon-copy-media::before { +.icon-crop::before { content: "\f148"; } -.icon-copy::before { +.icon-crown-take-off-outline::before { content: "\f149"; } -.icon-craft::before { +.icon-crown-take-off::before { content: "\f14a"; } -.icon-crop::before { +.icon-crown-wear-outline::before { content: "\f14b"; } -.icon-crown-take-off-outline::before { +.icon-crown-wear::before { content: "\f14c"; } -.icon-crown-take-off::before { +.icon-darkmode::before { content: "\f14d"; } -.icon-crown-wear-outline::before { +.icon-data::before { content: "\f14e"; } -.icon-crown-wear::before { +.icon-delete-filled::before { content: "\f14f"; } -.icon-darkmode::before { +.icon-delete-left::before { content: "\f150"; } -.icon-data::before { +.icon-delete-user::before { content: "\f151"; } -.icon-delete-filled::before { +.icon-delete::before { content: "\f152"; } -.icon-delete-left::before { +.icon-diamond::before { content: "\f153"; } -.icon-delete-user::before { +.icon-document::before { content: "\f154"; } -.icon-delete::before { +.icon-double-badge::before { content: "\f155"; } -.icon-diamond::before { +.icon-down::before { content: "\f156"; } -.icon-document::before { +.icon-download::before { content: "\f157"; } -.icon-double-badge::before { +.icon-dropdown-arrows::before { content: "\f158"; } -.icon-down::before { +.icon-eats::before { content: "\f159"; } -.icon-download::before { +.icon-edit::before { content: "\f15a"; } -.icon-dropdown-arrows::before { +.icon-email::before { content: "\f15b"; } -.icon-eats::before { +.icon-enter::before { content: "\f15c"; } -.icon-edit::before { +.icon-expand-modal::before { content: "\f15d"; } -.icon-email::before { +.icon-expand::before { content: "\f15e"; } -.icon-enter::before { +.icon-eye-crossed-outline::before { content: "\f15f"; } -.icon-expand-modal::before { +.icon-eye-crossed::before { content: "\f160"; } -.icon-expand::before { +.icon-eye-outline::before { content: "\f161"; } -.icon-eye-crossed-outline::before { +.icon-eye::before { content: "\f162"; } -.icon-eye-crossed::before { +.icon-favorite-filled::before { content: "\f163"; } -.icon-eye-outline::before { +.icon-favorite::before { content: "\f164"; } -.icon-eye::before { +.icon-file-badge::before { content: "\f165"; } -.icon-favorite-filled::before { +.icon-flag::before { content: "\f166"; } -.icon-favorite::before { +.icon-flip::before { content: "\f167"; } -.icon-file-badge::before { +.icon-folder-badge::before { content: "\f168"; } -.icon-flag::before { +.icon-folder-tabs-bot::before { content: "\f169"; } -.icon-flip::before { +.icon-folder-tabs-channel::before { content: "\f16a"; } -.icon-folder-badge::before { +.icon-folder-tabs-chat::before { content: "\f16b"; } -.icon-folder-tabs-bot::before { +.icon-folder-tabs-chats::before { content: "\f16c"; } -.icon-folder-tabs-channel::before { +.icon-folder-tabs-folder::before { content: "\f16d"; } -.icon-folder-tabs-chat::before { +.icon-folder-tabs-group::before { content: "\f16e"; } -.icon-folder-tabs-chats::before { +.icon-folder-tabs-star::before { content: "\f16f"; } -.icon-folder-tabs-folder::before { +.icon-folder-tabs-user::before { content: "\f170"; } -.icon-folder-tabs-group::before { +.icon-folder::before { content: "\f171"; } -.icon-folder-tabs-star::before { +.icon-fontsize::before { content: "\f172"; } -.icon-folder-tabs-user::before { +.icon-forums::before { content: "\f173"; } -.icon-folder::before { +.icon-forward::before { content: "\f174"; } -.icon-fontsize::before { +.icon-fragment::before { content: "\f175"; } -.icon-forums::before { +.icon-frozen-time::before { content: "\f176"; } -.icon-forward::before { +.icon-fullscreen::before { content: "\f177"; } -.icon-fragment::before { +.icon-gifs::before { content: "\f178"; } -.icon-frozen-time::before { +.icon-gift-transfer-inline::before { content: "\f179"; } -.icon-fullscreen::before { +.icon-gift::before { content: "\f17a"; } -.icon-gifs::before { +.icon-group-filled::before { content: "\f17b"; } -.icon-gift-transfer-inline::before { +.icon-group::before { content: "\f17c"; } -.icon-gift::before { +.icon-grouped-disable::before { content: "\f17d"; } -.icon-group-filled::before { +.icon-grouped::before { content: "\f17e"; } -.icon-group::before { +.icon-hand-stop-filled::before { content: "\f17f"; } -.icon-grouped-disable::before { +.icon-hand-stop::before { content: "\f180"; } -.icon-grouped::before { +.icon-hashtag::before { content: "\f181"; } -.icon-hand-stop-filled::before { +.icon-hd-photo::before { content: "\f182"; } -.icon-hand-stop::before { +.icon-heart-outline::before { content: "\f183"; } -.icon-hashtag::before { +.icon-heart::before { content: "\f184"; } -.icon-hd-photo::before { +.icon-help::before { content: "\f185"; } -.icon-heart-outline::before { +.icon-info-filled::before { content: "\f186"; } -.icon-heart::before { +.icon-info::before { content: "\f187"; } -.icon-help::before { +.icon-install::before { content: "\f188"; } -.icon-info-filled::before { +.icon-italic::before { content: "\f189"; } -.icon-info::before { +.icon-key::before { content: "\f18a"; } -.icon-install::before { +.icon-keyboard::before { content: "\f18b"; } -.icon-italic::before { +.icon-lamp::before { content: "\f18c"; } -.icon-key::before { +.icon-language::before { content: "\f18d"; } -.icon-keyboard::before { +.icon-large-pause::before { content: "\f18e"; } -.icon-lamp::before { +.icon-large-play::before { content: "\f18f"; } -.icon-language::before { +.icon-link-badge::before { content: "\f190"; } -.icon-large-pause::before { +.icon-link-broken::before { content: "\f191"; } -.icon-large-play::before { +.icon-link::before { content: "\f192"; } -.icon-link-badge::before { +.icon-location::before { content: "\f193"; } -.icon-link-broken::before { +.icon-lock-badge::before { content: "\f194"; } -.icon-link::before { +.icon-lock::before { content: "\f195"; } -.icon-location::before { +.icon-logout::before { content: "\f196"; } -.icon-lock-badge::before { +.icon-loop::before { content: "\f197"; } -.icon-lock::before { +.icon-mention::before { content: "\f198"; } -.icon-logout::before { +.icon-menu::before { content: "\f199"; } -.icon-loop::before { +.icon-message-failed::before { content: "\f19a"; } -.icon-mention::before { +.icon-message-pending::before { content: "\f19b"; } -.icon-menu::before { +.icon-message-read::before { content: "\f19c"; } -.icon-message-failed::before { +.icon-message-succeeded::before { content: "\f19d"; } -.icon-message-pending::before { +.icon-message::before { content: "\f19e"; } -.icon-message-read::before { +.icon-microphone-alt::before { content: "\f19f"; } -.icon-message-succeeded::before { +.icon-microphone::before { content: "\f1a0"; } -.icon-message::before { +.icon-monospace::before { content: "\f1a1"; } -.icon-microphone-alt::before { +.icon-more-circle::before { content: "\f1a2"; } -.icon-microphone::before { +.icon-more::before { content: "\f1a3"; } -.icon-monospace::before { +.icon-move-caption-down::before { content: "\f1a4"; } -.icon-more-circle::before { +.icon-move-caption-up::before { content: "\f1a5"; } -.icon-more::before { +.icon-mute::before { content: "\f1a6"; } -.icon-move-caption-down::before { +.icon-muted::before { content: "\f1a7"; } -.icon-move-caption-up::before { +.icon-my-notes::before { content: "\f1a8"; } -.icon-mute::before { +.icon-new-chat-filled::before { content: "\f1a9"; } -.icon-muted::before { +.icon-new-send::before { content: "\f1aa"; } -.icon-my-notes::before { +.icon-next-link::before { content: "\f1ab"; } -.icon-new-chat-filled::before { +.icon-next::before { content: "\f1ac"; } -.icon-new-send::before { +.icon-no-download::before { content: "\f1ad"; } -.icon-next-link::before { +.icon-no-share::before { content: "\f1ae"; } -.icon-next::before { +.icon-nochannel::before { content: "\f1af"; } -.icon-no-download::before { +.icon-noise-suppression::before { content: "\f1b0"; } -.icon-no-share::before { +.icon-non-contacts::before { content: "\f1b1"; } -.icon-nochannel::before { +.icon-note::before { content: "\f1b2"; } -.icon-noise-suppression::before { +.icon-one-filled::before { content: "\f1b3"; } -.icon-non-contacts::before { +.icon-open-in-new-tab::before { content: "\f1b4"; } -.icon-note::before { +.icon-password-off::before { content: "\f1b5"; } -.icon-one-filled::before { +.icon-pause::before { content: "\f1b6"; } -.icon-open-in-new-tab::before { +.icon-permissions::before { content: "\f1b7"; } -.icon-password-off::before { +.icon-phone-discard-outline::before { content: "\f1b8"; } -.icon-pause::before { +.icon-phone-discard::before { content: "\f1b9"; } -.icon-permissions::before { +.icon-phone::before { content: "\f1ba"; } -.icon-phone-discard-outline::before { +.icon-photo::before { content: "\f1bb"; } -.icon-phone-discard::before { +.icon-pin-badge::before { content: "\f1bc"; } -.icon-phone::before { +.icon-pin-list::before { content: "\f1bd"; } -.icon-photo::before { +.icon-pin::before { content: "\f1be"; } -.icon-pin-badge::before { +.icon-pinned-chat::before { content: "\f1bf"; } -.icon-pin-list::before { +.icon-pinned-message::before { content: "\f1c0"; } -.icon-pin::before { +.icon-pip::before { content: "\f1c1"; } -.icon-pinned-chat::before { +.icon-play-story::before { content: "\f1c2"; } -.icon-pinned-message::before { +.icon-play::before { content: "\f1c3"; } -.icon-pip::before { +.icon-poll-badge::before { content: "\f1c4"; } -.icon-play-story::before { +.icon-poll::before { content: "\f1c5"; } -.icon-play::before { +.icon-previous-link::before { content: "\f1c6"; } -.icon-poll::before { +.icon-previous::before { content: "\f1c7"; } -.icon-previous-link::before { +.icon-privacy-policy::before { content: "\f1c8"; } -.icon-previous::before { +.icon-proof-of-ownership::before { content: "\f1c9"; } -.icon-privacy-policy::before { +.icon-quote-text::before { content: "\f1ca"; } -.icon-proof-of-ownership::before { +.icon-quote::before { content: "\f1cb"; } -.icon-quote-text::before { +.icon-radial-badge::before { content: "\f1cc"; } -.icon-quote::before { +.icon-rating-icons-level1::before { content: "\f1cd"; } -.icon-radial-badge::before { +.icon-rating-icons-level10::before { content: "\f1ce"; } -.icon-rating-icons-level1::before { +.icon-rating-icons-level2::before { content: "\f1cf"; } -.icon-rating-icons-level10::before { +.icon-rating-icons-level20::before { content: "\f1d0"; } -.icon-rating-icons-level2::before { +.icon-rating-icons-level3::before { content: "\f1d1"; } -.icon-rating-icons-level20::before { +.icon-rating-icons-level30::before { content: "\f1d2"; } -.icon-rating-icons-level3::before { +.icon-rating-icons-level4::before { content: "\f1d3"; } -.icon-rating-icons-level30::before { +.icon-rating-icons-level40::before { content: "\f1d4"; } -.icon-rating-icons-level4::before { +.icon-rating-icons-level5::before { content: "\f1d5"; } -.icon-rating-icons-level40::before { +.icon-rating-icons-level50::before { content: "\f1d6"; } -.icon-rating-icons-level5::before { +.icon-rating-icons-level6::before { content: "\f1d7"; } -.icon-rating-icons-level50::before { +.icon-rating-icons-level60::before { content: "\f1d8"; } -.icon-rating-icons-level6::before { +.icon-rating-icons-level7::before { content: "\f1d9"; } -.icon-rating-icons-level60::before { +.icon-rating-icons-level70::before { content: "\f1da"; } -.icon-rating-icons-level7::before { +.icon-rating-icons-level8::before { content: "\f1db"; } -.icon-rating-icons-level70::before { +.icon-rating-icons-level80::before { content: "\f1dc"; } -.icon-rating-icons-level8::before { +.icon-rating-icons-level9::before { content: "\f1dd"; } -.icon-rating-icons-level80::before { +.icon-rating-icons-level90::before { content: "\f1de"; } -.icon-rating-icons-level9::before { +.icon-rating-icons-negative::before { content: "\f1df"; } -.icon-rating-icons-level90::before { +.icon-readchats::before { content: "\f1e0"; } -.icon-rating-icons-negative::before { +.icon-recent::before { content: "\f1e1"; } -.icon-readchats::before { +.icon-redo::before { content: "\f1e2"; } -.icon-recent::before { +.icon-refund::before { content: "\f1e3"; } -.icon-redo::before { +.icon-reload::before { content: "\f1e4"; } -.icon-refund::before { +.icon-remove-quote::before { content: "\f1e5"; } -.icon-reload::before { +.icon-remove::before { content: "\f1e6"; } -.icon-remove-quote::before { +.icon-reopen-topic::before { content: "\f1e7"; } -.icon-remove::before { +.icon-reorder-tabs::before { content: "\f1e8"; } -.icon-reopen-topic::before { +.icon-replace::before { content: "\f1e9"; } -.icon-reorder-tabs::before { +.icon-replies::before { content: "\f1ea"; } -.icon-replace::before { +.icon-reply-filled::before { content: "\f1eb"; } -.icon-replies::before { +.icon-reply::before { content: "\f1ec"; } -.icon-reply-filled::before { +.icon-revenue-split::before { content: "\f1ed"; } -.icon-reply::before { +.icon-revote::before { content: "\f1ee"; } -.icon-revenue-split::before { +.icon-rotate::before { content: "\f1ef"; } -.icon-revote::before { +.icon-save-story::before { content: "\f1f0"; } -.icon-rotate::before { +.icon-saved-messages::before { content: "\f1f1"; } -.icon-save-story::before { +.icon-schedule::before { content: "\f1f2"; } -.icon-saved-messages::before { +.icon-scheduled::before { content: "\f1f3"; } -.icon-schedule::before { +.icon-sd-photo::before { content: "\f1f4"; } -.icon-scheduled::before { +.icon-search::before { content: "\f1f5"; } -.icon-sd-photo::before { +.icon-select-filled::before { content: "\f1f6"; } -.icon-search::before { +.icon-select::before { content: "\f1f7"; } -.icon-select-filled::before { +.icon-sell-outline::before { content: "\f1f8"; } -.icon-select::before { +.icon-sell::before { content: "\f1f9"; } -.icon-sell-outline::before { +.icon-send-outline::before { content: "\f1fa"; } -.icon-sell::before { +.icon-send::before { content: "\f1fb"; } -.icon-send-outline::before { +.icon-settings-filled::before { content: "\f1fc"; } -.icon-send::before { +.icon-settings::before { content: "\f1fd"; } -.icon-settings-filled::before { +.icon-share-filled::before { content: "\f1fe"; } -.icon-settings::before { +.icon-share-screen-outlined::before { content: "\f1ff"; } -.icon-share-filled::before { +.icon-share-screen-stop::before { content: "\f200"; } -.icon-share-screen-outlined::before { +.icon-share-screen::before { content: "\f201"; } -.icon-share-screen-stop::before { +.icon-show-message::before { content: "\f202"; } -.icon-share-screen::before { +.icon-sidebar::before { content: "\f203"; } -.icon-show-message::before { +.icon-skip-next::before { content: "\f204"; } -.icon-sidebar::before { +.icon-skip-previous::before { content: "\f205"; } -.icon-skip-next::before { +.icon-smallscreen::before { content: "\f206"; } -.icon-skip-previous::before { +.icon-smile::before { content: "\f207"; } -.icon-smallscreen::before { +.icon-sort-by-date::before { content: "\f208"; } -.icon-smile::before { +.icon-sort-by-number::before { content: "\f209"; } -.icon-sort-by-date::before { +.icon-sort-by-price::before { content: "\f20a"; } -.icon-sort-by-number::before { +.icon-sort::before { content: "\f20b"; } -.icon-sort-by-price::before { +.icon-speaker-muted-story::before { content: "\f20c"; } -.icon-sort::before { +.icon-speaker-outline::before { content: "\f20d"; } -.icon-speaker-muted-story::before { +.icon-speaker-story::before { content: "\f20e"; } -.icon-speaker-outline::before { +.icon-speaker::before { content: "\f20f"; } -.icon-speaker-story::before { +.icon-spoiler-disable::before { content: "\f210"; } -.icon-speaker::before { +.icon-spoiler::before { content: "\f211"; } -.icon-spoiler-disable::before { +.icon-sport::before { content: "\f212"; } -.icon-spoiler::before { +.icon-star::before { content: "\f213"; } -.icon-sport::before { +.icon-stars-lock::before { content: "\f214"; } -.icon-star::before { +.icon-stars-refund::before { content: "\f215"; } -.icon-stars-lock::before { +.icon-stats::before { content: "\f216"; } -.icon-stars-refund::before { +.icon-stealth-future::before { content: "\f217"; } -.icon-stats::before { +.icon-stealth-past::before { content: "\f218"; } -.icon-stealth-future::before { +.icon-stickers::before { content: "\f219"; } -.icon-stealth-past::before { +.icon-stop-raising-hand::before { content: "\f21a"; } -.icon-stickers::before { +.icon-stop::before { content: "\f21b"; } -.icon-stop-raising-hand::before { +.icon-story-caption::before { content: "\f21c"; } -.icon-stop::before { +.icon-story-expired::before { content: "\f21d"; } -.icon-story-caption::before { +.icon-story-priority::before { content: "\f21e"; } -.icon-story-expired::before { +.icon-story-reply::before { content: "\f21f"; } -.icon-story-priority::before { +.icon-strikethrough::before { content: "\f220"; } -.icon-story-reply::before { +.icon-tag-add::before { content: "\f221"; } -.icon-strikethrough::before { +.icon-tag-crossed::before { content: "\f222"; } -.icon-tag-add::before { +.icon-tag-filter::before { content: "\f223"; } -.icon-tag-crossed::before { +.icon-tag-name::before { content: "\f224"; } -.icon-tag-filter::before { +.icon-tag::before { content: "\f225"; } -.icon-tag-name::before { +.icon-timer::before { content: "\f226"; } -.icon-tag::before { +.icon-toncoin::before { content: "\f227"; } -.icon-timer::before { +.icon-tools::before { content: "\f228"; } -.icon-toncoin::before { +.icon-topic-new::before { content: "\f229"; } -.icon-tools::before { +.icon-trade::before { content: "\f22a"; } -.icon-topic-new::before { +.icon-transcribe::before { content: "\f22b"; } -.icon-trade::before { +.icon-truck::before { content: "\f22c"; } -.icon-transcribe::before { +.icon-unarchive::before { content: "\f22d"; } -.icon-truck::before { +.icon-underlined::before { content: "\f22e"; } -.icon-unarchive::before { +.icon-understood::before { content: "\f22f"; } -.icon-underlined::before { +.icon-undo::before { content: "\f230"; } -.icon-understood::before { +.icon-unique-profile::before { content: "\f231"; } -.icon-undo::before { +.icon-unlist-outline::before { content: "\f232"; } -.icon-unique-profile::before { +.icon-unlist::before { content: "\f233"; } -.icon-unlist-outline::before { +.icon-unlock-badge::before { content: "\f234"; } -.icon-unlist::before { +.icon-unlock::before { content: "\f235"; } -.icon-unlock-badge::before { +.icon-unmute::before { content: "\f236"; } -.icon-unlock::before { +.icon-unpin::before { content: "\f237"; } -.icon-unmute::before { +.icon-unread::before { content: "\f238"; } -.icon-unpin::before { +.icon-up::before { content: "\f239"; } -.icon-unread::before { +.icon-user-filled::before { content: "\f23a"; } -.icon-up::before { +.icon-user-online::before { content: "\f23b"; } -.icon-user-filled::before { +.icon-user-stars::before { content: "\f23c"; } -.icon-user-online::before { +.icon-user-tag::before { content: "\f23d"; } -.icon-user-stars::before { +.icon-user::before { content: "\f23e"; } -.icon-user-tag::before { +.icon-video-outlined::before { content: "\f23f"; } -.icon-user::before { +.icon-video-stop::before { content: "\f240"; } -.icon-video-outlined::before { +.icon-video::before { content: "\f241"; } -.icon-video-stop::before { +.icon-view-once::before { content: "\f242"; } -.icon-video::before { +.icon-voice-chat::before { content: "\f243"; } -.icon-view-once::before { +.icon-volume-1::before { content: "\f244"; } -.icon-voice-chat::before { +.icon-volume-2::before { content: "\f245"; } -.icon-volume-1::before { +.icon-volume-3::before { content: "\f246"; } -.icon-volume-2::before { +.icon-warning::before { content: "\f247"; } -.icon-volume-3::before { +.icon-web::before { content: "\f248"; } -.icon-warning::before { +.icon-webapp::before { content: "\f249"; } -.icon-web::before { +.icon-word-wrap::before { content: "\f24a"; } -.icon-webapp::before { +.icon-zoom-in::before { content: "\f24b"; } -.icon-word-wrap::before { +.icon-zoom-out::before { content: "\f24c"; } -.icon-zoom-in::before { - content: "\f24d"; -} -.icon-zoom-out::before { - content: "\f24e"; -} diff --git a/src/styles/icons.scss b/src/styles/icons.scss index 8a9000934..e18b571dd 100644 --- a/src/styles/icons.scss +++ b/src/styles/icons.scss @@ -24,330 +24,328 @@ $icons-map: ( "add-user": "\f106", "add": "\f107", "admin": "\f108", - "ai-edit": "\f109", - "ai-fix": "\f10a", - "ai": "\f10b", - "allow-share": "\f10c", - "allow-speak": "\f10d", - "animals": "\f10e", - "animations": "\f10f", - "archive-filled": "\f110", - "archive-from-main": "\f111", - "archive-to-main": "\f112", - "archive": "\f113", - "arrow-down-circle": "\f114", - "arrow-down": "\f115", - "arrow-left": "\f116", - "arrow-right": "\f117", - "ask-support": "\f118", - "attach": "\f119", - "auction-drop": "\f11a", - "auction-filled": "\f11b", - "auction-next-round": "\f11c", - "auction": "\f11d", - "author-hidden": "\f11e", - "avatar-archived-chats": "\f11f", - "avatar-deleted-account": "\f120", - "avatar-saved-messages": "\f121", - "bold": "\f122", - "boost-craft-chance": "\f123", - "boost-outline": "\f124", - "boost": "\f125", - "boostcircle": "\f126", - "boosts": "\f127", - "bot-command": "\f128", - "bot-commands-filled": "\f129", - "bots": "\f12a", - "brush": "\f12b", - "bug": "\f12c", - "calendar-filter": "\f12d", - "calendar": "\f12e", - "camera-add": "\f12f", - "camera": "\f130", - "car": "\f131", - "card": "\f132", - "cash-circle": "\f133", - "channel-filled": "\f134", - "channel": "\f135", - "channelviews": "\f136", - "chat-badge": "\f137", - "chats-badge": "\f138", - "check-bold": "\f139", - "check": "\f13a", - "clock-edit": "\f13b", - "clock": "\f13c", - "close-circle": "\f13d", - "close-topic": "\f13e", - "close": "\f13f", - "closed-gift": "\f140", - "cloud-download": "\f141", - "collapse-modal": "\f142", - "collapse": "\f143", - "colorize": "\f144", - "combine-craft": "\f145", - "comments-sticker": "\f146", - "comments": "\f147", - "copy-media": "\f148", - "copy": "\f149", - "craft": "\f14a", - "crop": "\f14b", - "crown-take-off-outline": "\f14c", - "crown-take-off": "\f14d", - "crown-wear-outline": "\f14e", - "crown-wear": "\f14f", - "darkmode": "\f150", - "data": "\f151", - "delete-filled": "\f152", - "delete-left": "\f153", - "delete-user": "\f154", - "delete": "\f155", - "diamond": "\f156", - "document": "\f157", - "double-badge": "\f158", - "down": "\f159", - "download": "\f15a", - "dropdown-arrows": "\f15b", - "eats": "\f15c", - "edit": "\f15d", - "email": "\f15e", - "enter": "\f15f", - "expand-modal": "\f160", - "expand": "\f161", - "eye-crossed-outline": "\f162", - "eye-crossed": "\f163", - "eye-outline": "\f164", - "eye": "\f165", - "favorite-filled": "\f166", - "favorite": "\f167", - "file-badge": "\f168", - "flag": "\f169", - "flip": "\f16a", - "folder-badge": "\f16b", - "folder-tabs-bot": "\f16c", - "folder-tabs-channel": "\f16d", - "folder-tabs-chat": "\f16e", - "folder-tabs-chats": "\f16f", - "folder-tabs-folder": "\f170", - "folder-tabs-group": "\f171", - "folder-tabs-star": "\f172", - "folder-tabs-user": "\f173", - "folder": "\f174", - "fontsize": "\f175", - "forums": "\f176", - "forward": "\f177", - "fragment": "\f178", - "frozen-time": "\f179", - "fullscreen": "\f17a", - "gifs": "\f17b", - "gift-transfer-inline": "\f17c", - "gift": "\f17d", - "group-filled": "\f17e", - "group": "\f17f", - "grouped-disable": "\f180", - "grouped": "\f181", - "hand-stop-filled": "\f182", - "hand-stop": "\f183", - "hashtag": "\f184", - "hd-photo": "\f185", - "heart-outline": "\f186", - "heart": "\f187", - "help": "\f188", - "info-filled": "\f189", - "info": "\f18a", - "install": "\f18b", - "italic": "\f18c", - "key": "\f18d", - "keyboard": "\f18e", - "lamp": "\f18f", - "language": "\f190", - "large-pause": "\f191", - "large-play": "\f192", - "link-badge": "\f193", - "link-broken": "\f194", - "link": "\f195", - "location": "\f196", - "lock-badge": "\f197", - "lock": "\f198", - "logout": "\f199", - "loop": "\f19a", - "mention": "\f19b", - "menu": "\f19c", - "message-failed": "\f19d", - "message-pending": "\f19e", - "message-read": "\f19f", - "message-succeeded": "\f1a0", - "message": "\f1a1", - "microphone-alt": "\f1a2", - "microphone": "\f1a3", - "monospace": "\f1a4", - "more-circle": "\f1a5", - "more": "\f1a6", - "move-caption-down": "\f1a7", - "move-caption-up": "\f1a8", - "mute": "\f1a9", - "muted": "\f1aa", - "my-notes": "\f1ab", - "new-chat-filled": "\f1ac", - "new-send": "\f1ad", - "next-link": "\f1ae", - "next": "\f1af", - "no-download": "\f1b0", - "no-share": "\f1b1", - "nochannel": "\f1b2", - "noise-suppression": "\f1b3", - "non-contacts": "\f1b4", - "note": "\f1b5", - "one-filled": "\f1b6", - "open-in-new-tab": "\f1b7", - "password-off": "\f1b8", - "pause": "\f1b9", - "permissions": "\f1ba", - "phone-discard-outline": "\f1bb", - "phone-discard": "\f1bc", - "phone": "\f1bd", - "photo": "\f1be", - "pin-badge": "\f1bf", - "pin-list": "\f1c0", - "pin": "\f1c1", - "pinned-chat": "\f1c2", - "pinned-message": "\f1c3", - "pip": "\f1c4", - "play-story": "\f1c5", - "play": "\f1c6", - "poll": "\f1c7", - "previous-link": "\f1c8", - "previous": "\f1c9", - "privacy-policy": "\f1ca", - "proof-of-ownership": "\f1cb", - "quote-text": "\f1cc", - "quote": "\f1cd", - "radial-badge": "\f1ce", - "rating-icons-level1": "\f1cf", - "rating-icons-level10": "\f1d0", - "rating-icons-level2": "\f1d1", - "rating-icons-level20": "\f1d2", - "rating-icons-level3": "\f1d3", - "rating-icons-level30": "\f1d4", - "rating-icons-level4": "\f1d5", - "rating-icons-level40": "\f1d6", - "rating-icons-level5": "\f1d7", - "rating-icons-level50": "\f1d8", - "rating-icons-level6": "\f1d9", - "rating-icons-level60": "\f1da", - "rating-icons-level7": "\f1db", - "rating-icons-level70": "\f1dc", - "rating-icons-level8": "\f1dd", - "rating-icons-level80": "\f1de", - "rating-icons-level9": "\f1df", - "rating-icons-level90": "\f1e0", - "rating-icons-negative": "\f1e1", - "readchats": "\f1e2", - "recent": "\f1e3", - "redo": "\f1e4", - "refund": "\f1e5", - "reload": "\f1e6", - "remove-quote": "\f1e7", - "remove": "\f1e8", - "reopen-topic": "\f1e9", - "reorder-tabs": "\f1ea", - "replace": "\f1eb", - "replies": "\f1ec", - "reply-filled": "\f1ed", - "reply": "\f1ee", - "revenue-split": "\f1ef", - "revote": "\f1f0", - "rotate": "\f1f1", - "save-story": "\f1f2", - "saved-messages": "\f1f3", - "schedule": "\f1f4", - "scheduled": "\f1f5", - "sd-photo": "\f1f6", - "search": "\f1f7", - "select-filled": "\f1f8", - "select": "\f1f9", - "sell-outline": "\f1fa", - "sell": "\f1fb", - "send-outline": "\f1fc", - "send": "\f1fd", - "settings-filled": "\f1fe", - "settings": "\f1ff", - "share-filled": "\f200", - "share-screen-outlined": "\f201", - "share-screen-stop": "\f202", - "share-screen": "\f203", - "show-message": "\f204", - "sidebar": "\f205", - "skip-next": "\f206", - "skip-previous": "\f207", - "smallscreen": "\f208", - "smile": "\f209", - "sort-by-date": "\f20a", - "sort-by-number": "\f20b", - "sort-by-price": "\f20c", - "sort": "\f20d", - "speaker-muted-story": "\f20e", - "speaker-outline": "\f20f", - "speaker-story": "\f210", - "speaker": "\f211", - "spoiler-disable": "\f212", - "spoiler": "\f213", - "sport": "\f214", - "star": "\f215", - "stars-lock": "\f216", - "stars-refund": "\f217", - "stats": "\f218", - "stealth-future": "\f219", - "stealth-past": "\f21a", - "stickers": "\f21b", - "stop-raising-hand": "\f21c", - "stop": "\f21d", - "story-caption": "\f21e", - "story-expired": "\f21f", - "story-priority": "\f220", - "story-reply": "\f221", - "strikethrough": "\f222", - "tag-add": "\f223", - "tag-crossed": "\f224", - "tag-filter": "\f225", - "tag-name": "\f226", - "tag": "\f227", - "timer": "\f228", - "toncoin": "\f229", - "tools": "\f22a", - "topic-new": "\f22b", - "trade": "\f22c", - "transcribe": "\f22d", - "truck": "\f22e", - "unarchive": "\f22f", - "underlined": "\f230", - "understood": "\f231", - "undo": "\f232", - "unique-profile": "\f233", - "unlist-outline": "\f234", - "unlist": "\f235", - "unlock-badge": "\f236", - "unlock": "\f237", - "unmute": "\f238", - "unpin": "\f239", - "unread": "\f23a", - "up": "\f23b", - "user-filled": "\f23c", - "user-online": "\f23d", - "user-stars": "\f23e", - "user-tag": "\f23f", - "user": "\f240", - "video-outlined": "\f241", - "video-stop": "\f242", - "video": "\f243", - "view-once": "\f244", - "voice-chat": "\f245", - "volume-1": "\f246", - "volume-2": "\f247", - "volume-3": "\f248", - "warning": "\f249", - "web": "\f24a", - "webapp": "\f24b", - "word-wrap": "\f24c", - "zoom-in": "\f24d", - "zoom-out": "\f24e", + "allow-share": "\f109", + "allow-speak": "\f10a", + "animals": "\f10b", + "animations": "\f10c", + "archive-filled": "\f10d", + "archive-from-main": "\f10e", + "archive-to-main": "\f10f", + "archive": "\f110", + "arrow-down-circle": "\f111", + "arrow-down": "\f112", + "arrow-left": "\f113", + "arrow-right": "\f114", + "ask-support": "\f115", + "attach": "\f116", + "auction-drop": "\f117", + "auction-filled": "\f118", + "auction-next-round": "\f119", + "auction": "\f11a", + "author-hidden": "\f11b", + "avatar-archived-chats": "\f11c", + "avatar-deleted-account": "\f11d", + "avatar-saved-messages": "\f11e", + "bold": "\f11f", + "boost-craft-chance": "\f120", + "boost-outline": "\f121", + "boost": "\f122", + "boostcircle": "\f123", + "boosts": "\f124", + "bot-command": "\f125", + "bot-commands-filled": "\f126", + "bots": "\f127", + "brush": "\f128", + "bug": "\f129", + "calendar-filter": "\f12a", + "calendar": "\f12b", + "camera-add": "\f12c", + "camera": "\f12d", + "car": "\f12e", + "card": "\f12f", + "cash-circle": "\f130", + "channel-filled": "\f131", + "channel": "\f132", + "channelviews": "\f133", + "chat-badge": "\f134", + "chats-badge": "\f135", + "check-bold": "\f136", + "check": "\f137", + "clock-edit": "\f138", + "clock": "\f139", + "close-circle": "\f13a", + "close-topic": "\f13b", + "close": "\f13c", + "closed-gift": "\f13d", + "cloud-download": "\f13e", + "collapse-modal": "\f13f", + "collapse": "\f140", + "colorize": "\f141", + "combine-craft": "\f142", + "comments-sticker": "\f143", + "comments": "\f144", + "copy-media": "\f145", + "copy": "\f146", + "craft": "\f147", + "crop": "\f148", + "crown-take-off-outline": "\f149", + "crown-take-off": "\f14a", + "crown-wear-outline": "\f14b", + "crown-wear": "\f14c", + "darkmode": "\f14d", + "data": "\f14e", + "delete-filled": "\f14f", + "delete-left": "\f150", + "delete-user": "\f151", + "delete": "\f152", + "diamond": "\f153", + "document": "\f154", + "double-badge": "\f155", + "down": "\f156", + "download": "\f157", + "dropdown-arrows": "\f158", + "eats": "\f159", + "edit": "\f15a", + "email": "\f15b", + "enter": "\f15c", + "expand-modal": "\f15d", + "expand": "\f15e", + "eye-crossed-outline": "\f15f", + "eye-crossed": "\f160", + "eye-outline": "\f161", + "eye": "\f162", + "favorite-filled": "\f163", + "favorite": "\f164", + "file-badge": "\f165", + "flag": "\f166", + "flip": "\f167", + "folder-badge": "\f168", + "folder-tabs-bot": "\f169", + "folder-tabs-channel": "\f16a", + "folder-tabs-chat": "\f16b", + "folder-tabs-chats": "\f16c", + "folder-tabs-folder": "\f16d", + "folder-tabs-group": "\f16e", + "folder-tabs-star": "\f16f", + "folder-tabs-user": "\f170", + "folder": "\f171", + "fontsize": "\f172", + "forums": "\f173", + "forward": "\f174", + "fragment": "\f175", + "frozen-time": "\f176", + "fullscreen": "\f177", + "gifs": "\f178", + "gift-transfer-inline": "\f179", + "gift": "\f17a", + "group-filled": "\f17b", + "group": "\f17c", + "grouped-disable": "\f17d", + "grouped": "\f17e", + "hand-stop-filled": "\f17f", + "hand-stop": "\f180", + "hashtag": "\f181", + "hd-photo": "\f182", + "heart-outline": "\f183", + "heart": "\f184", + "help": "\f185", + "info-filled": "\f186", + "info": "\f187", + "install": "\f188", + "italic": "\f189", + "key": "\f18a", + "keyboard": "\f18b", + "lamp": "\f18c", + "language": "\f18d", + "large-pause": "\f18e", + "large-play": "\f18f", + "link-badge": "\f190", + "link-broken": "\f191", + "link": "\f192", + "location": "\f193", + "lock-badge": "\f194", + "lock": "\f195", + "logout": "\f196", + "loop": "\f197", + "mention": "\f198", + "menu": "\f199", + "message-failed": "\f19a", + "message-pending": "\f19b", + "message-read": "\f19c", + "message-succeeded": "\f19d", + "message": "\f19e", + "microphone-alt": "\f19f", + "microphone": "\f1a0", + "monospace": "\f1a1", + "more-circle": "\f1a2", + "more": "\f1a3", + "move-caption-down": "\f1a4", + "move-caption-up": "\f1a5", + "mute": "\f1a6", + "muted": "\f1a7", + "my-notes": "\f1a8", + "new-chat-filled": "\f1a9", + "new-send": "\f1aa", + "next-link": "\f1ab", + "next": "\f1ac", + "no-download": "\f1ad", + "no-share": "\f1ae", + "nochannel": "\f1af", + "noise-suppression": "\f1b0", + "non-contacts": "\f1b1", + "note": "\f1b2", + "one-filled": "\f1b3", + "open-in-new-tab": "\f1b4", + "password-off": "\f1b5", + "pause": "\f1b6", + "permissions": "\f1b7", + "phone-discard-outline": "\f1b8", + "phone-discard": "\f1b9", + "phone": "\f1ba", + "photo": "\f1bb", + "pin-badge": "\f1bc", + "pin-list": "\f1bd", + "pin": "\f1be", + "pinned-chat": "\f1bf", + "pinned-message": "\f1c0", + "pip": "\f1c1", + "play-story": "\f1c2", + "play": "\f1c3", + "poll-badge": "\f1c4", + "poll": "\f1c5", + "previous-link": "\f1c6", + "previous": "\f1c7", + "privacy-policy": "\f1c8", + "proof-of-ownership": "\f1c9", + "quote-text": "\f1ca", + "quote": "\f1cb", + "radial-badge": "\f1cc", + "rating-icons-level1": "\f1cd", + "rating-icons-level10": "\f1ce", + "rating-icons-level2": "\f1cf", + "rating-icons-level20": "\f1d0", + "rating-icons-level3": "\f1d1", + "rating-icons-level30": "\f1d2", + "rating-icons-level4": "\f1d3", + "rating-icons-level40": "\f1d4", + "rating-icons-level5": "\f1d5", + "rating-icons-level50": "\f1d6", + "rating-icons-level6": "\f1d7", + "rating-icons-level60": "\f1d8", + "rating-icons-level7": "\f1d9", + "rating-icons-level70": "\f1da", + "rating-icons-level8": "\f1db", + "rating-icons-level80": "\f1dc", + "rating-icons-level9": "\f1dd", + "rating-icons-level90": "\f1de", + "rating-icons-negative": "\f1df", + "readchats": "\f1e0", + "recent": "\f1e1", + "redo": "\f1e2", + "refund": "\f1e3", + "reload": "\f1e4", + "remove-quote": "\f1e5", + "remove": "\f1e6", + "reopen-topic": "\f1e7", + "reorder-tabs": "\f1e8", + "replace": "\f1e9", + "replies": "\f1ea", + "reply-filled": "\f1eb", + "reply": "\f1ec", + "revenue-split": "\f1ed", + "revote": "\f1ee", + "rotate": "\f1ef", + "save-story": "\f1f0", + "saved-messages": "\f1f1", + "schedule": "\f1f2", + "scheduled": "\f1f3", + "sd-photo": "\f1f4", + "search": "\f1f5", + "select-filled": "\f1f6", + "select": "\f1f7", + "sell-outline": "\f1f8", + "sell": "\f1f9", + "send-outline": "\f1fa", + "send": "\f1fb", + "settings-filled": "\f1fc", + "settings": "\f1fd", + "share-filled": "\f1fe", + "share-screen-outlined": "\f1ff", + "share-screen-stop": "\f200", + "share-screen": "\f201", + "show-message": "\f202", + "sidebar": "\f203", + "skip-next": "\f204", + "skip-previous": "\f205", + "smallscreen": "\f206", + "smile": "\f207", + "sort-by-date": "\f208", + "sort-by-number": "\f209", + "sort-by-price": "\f20a", + "sort": "\f20b", + "speaker-muted-story": "\f20c", + "speaker-outline": "\f20d", + "speaker-story": "\f20e", + "speaker": "\f20f", + "spoiler-disable": "\f210", + "spoiler": "\f211", + "sport": "\f212", + "star": "\f213", + "stars-lock": "\f214", + "stars-refund": "\f215", + "stats": "\f216", + "stealth-future": "\f217", + "stealth-past": "\f218", + "stickers": "\f219", + "stop-raising-hand": "\f21a", + "stop": "\f21b", + "story-caption": "\f21c", + "story-expired": "\f21d", + "story-priority": "\f21e", + "story-reply": "\f21f", + "strikethrough": "\f220", + "tag-add": "\f221", + "tag-crossed": "\f222", + "tag-filter": "\f223", + "tag-name": "\f224", + "tag": "\f225", + "timer": "\f226", + "toncoin": "\f227", + "tools": "\f228", + "topic-new": "\f229", + "trade": "\f22a", + "transcribe": "\f22b", + "truck": "\f22c", + "unarchive": "\f22d", + "underlined": "\f22e", + "understood": "\f22f", + "undo": "\f230", + "unique-profile": "\f231", + "unlist-outline": "\f232", + "unlist": "\f233", + "unlock-badge": "\f234", + "unlock": "\f235", + "unmute": "\f236", + "unpin": "\f237", + "unread": "\f238", + "up": "\f239", + "user-filled": "\f23a", + "user-online": "\f23b", + "user-stars": "\f23c", + "user-tag": "\f23d", + "user": "\f23e", + "video-outlined": "\f23f", + "video-stop": "\f240", + "video": "\f241", + "view-once": "\f242", + "voice-chat": "\f243", + "volume-1": "\f244", + "volume-2": "\f245", + "volume-3": "\f246", + "warning": "\f247", + "web": "\f248", + "webapp": "\f249", + "word-wrap": "\f24a", + "zoom-in": "\f24b", + "zoom-out": "\f24c", ); diff --git a/src/styles/icons.woff b/src/styles/icons.woff index 8976affee..36d5640dc 100644 Binary files a/src/styles/icons.woff and b/src/styles/icons.woff differ diff --git a/src/styles/icons.woff2 b/src/styles/icons.woff2 index 8c800fe00..527520e9d 100644 Binary files a/src/styles/icons.woff2 and b/src/styles/icons.woff2 differ diff --git a/src/types/icons/font.ts b/src/types/icons/font.ts index f6c75a101..04f08da96 100644 --- a/src/types/icons/font.ts +++ b/src/types/icons/font.ts @@ -197,6 +197,7 @@ export type FontIconName = | 'pip' | 'play-story' | 'play' + | 'poll-badge' | 'poll' | 'previous-link' | 'previous' diff --git a/src/types/index.ts b/src/types/index.ts index 763718104..084872f14 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -623,8 +623,10 @@ export interface ThreadReadState { unreadCount?: number; unreadMentionsCount?: number; unreadReactionsCount?: number; + unreadPollVotesCount?: number; unreadReactions?: number[]; unreadMentions?: number[]; + unreadPollVotes?: number[]; hasUnreadMark?: boolean; lastReadOutboxMessageId?: number; diff --git a/src/types/language.d.ts b/src/types/language.d.ts index f4b49f75a..2469e5970 100644 --- a/src/types/language.d.ts +++ b/src/types/language.d.ts @@ -91,6 +91,7 @@ export interface LangPair { 'AnonymousPoll': undefined; 'AccDescrReactionMentionDown': undefined; 'AccDescrMentionDown': undefined; + 'AccDescrPollVoteDown': undefined; 'AccDescrPageDown': undefined; 'ChannelPrivate': undefined; 'ChannelPrivateInfo': undefined;