From 6ad9b8575fc18a6758f078abc048002517a418d2 Mon Sep 17 00:00:00 2001 From: Alexander Zinchuk Date: Tue, 9 Sep 2025 20:26:01 +0200 Subject: [PATCH] Chat: Implement folder badges (follow-up 2) (#6197) --- package-lock.json | 4 ++-- package.json | 2 +- public/version.txt | 2 +- src/components/left/main/Chat.scss | 6 +----- src/components/left/main/Chat.tsx | 1 + src/components/left/main/ChatTags.module.scss | 4 +++- src/components/middle/composer/BotKeyboardMenu.tsx | 2 +- src/components/ui/ListItem.scss | 6 ++++++ src/global/actions/api/chats.ts | 4 +++- src/global/types/actions.ts | 2 +- 10 files changed, 20 insertions(+), 13 deletions(-) diff --git a/package-lock.json b/package-lock.json index b6219463a..10334ba09 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "telegram-t", - "version": "10.9.70", + "version": "10.9.71", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "telegram-t", - "version": "10.9.70", + "version": "10.9.71", "license": "GPL-3.0-or-later", "dependencies": { "@cryptography/aes": "^0.1.1", diff --git a/package.json b/package.json index 84255e132..42bf0f745 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "telegram-t", - "version": "10.9.70", + "version": "10.9.71", "description": "", "type": "module", "main": "index.js", diff --git a/public/version.txt b/public/version.txt index ef7e2ab4e..f071e365a 100644 --- a/public/version.txt +++ b/public/version.txt @@ -1 +1 @@ -10.9.70 +10.9.71 diff --git a/src/components/left/main/Chat.scss b/src/components/left/main/Chat.scss index 3ca2eaa1f..afa5d5cbf 100644 --- a/src/components/left/main/Chat.scss +++ b/src/components/left/main/Chat.scss @@ -118,10 +118,6 @@ } } - .ListItem-button { - height: 72px; - } - .ripple-container { z-index: var(--z-chat-ripple); } @@ -341,7 +337,7 @@ } &.has-tags { - line-height: 1.25rem; + line-height: 1.375rem; .info-row { height: 1.25rem; } diff --git a/src/components/left/main/Chat.tsx b/src/components/left/main/Chat.tsx index ced2b02d0..14285ada8 100644 --- a/src/components/left/main/Chat.tsx +++ b/src/components/left/main/Chat.tsx @@ -359,6 +359,7 @@ const Chat: FC = ({ isSelected && 'selected', isSelectedForum && 'selected-forum', isPreview && 'standalone', + shouldRenderTags && 'chat-item-with-tags', className, ); diff --git a/src/components/left/main/ChatTags.module.scss b/src/components/left/main/ChatTags.module.scss index 4de26fd0d..88ed45ba7 100644 --- a/src/components/left/main/ChatTags.module.scss +++ b/src/components/left/main/ChatTags.module.scss @@ -5,6 +5,8 @@ } .tag { + --custom-emoji-size: 0.75rem; + --emoji-size: 0.75rem; --custom-emoji-size: 0.75rem; @@ -21,7 +23,7 @@ font-size: 0.625rem; font-weight: var(--font-weight-medium); - line-height: 0.75rem; + line-height: 0.875rem; color: var(--accent-color); text-align: center; text-transform: uppercase; diff --git a/src/components/middle/composer/BotKeyboardMenu.tsx b/src/components/middle/composer/BotKeyboardMenu.tsx index 745b5fb48..d0a8fd98c 100644 --- a/src/components/middle/composer/BotKeyboardMenu.tsx +++ b/src/components/middle/composer/BotKeyboardMenu.tsx @@ -20,12 +20,12 @@ import './BotKeyboardMenu.scss'; export type OwnProps = { isOpen: boolean; messageId: number; + threadId?: ThreadId; onClose: NoneToVoidFunction; }; type StateProps = { message?: ApiMessage; - threadId?: ThreadId; }; const BotKeyboardMenu: FC = ({ diff --git a/src/components/ui/ListItem.scss b/src/components/ui/ListItem.scss index 310798aa4..4313d469e 100644 --- a/src/components/ui/ListItem.scss +++ b/src/components/ui/ListItem.scss @@ -223,6 +223,12 @@ padding: 0.5625rem; } + &.chat-item-with-tags { + .ListItem-button { + padding: 0.375rem 0.5625rem; + } + } + &.contact-list-item { .ListItem-button { padding: 0.5rem; diff --git a/src/global/actions/api/chats.ts b/src/global/actions/api/chats.ts index af5cfd965..28299968d 100644 --- a/src/global/actions/api/chats.ts +++ b/src/global/actions/api/chats.ts @@ -1711,6 +1711,7 @@ addActionHandler('openChatByUsername', async (global, actions, payload): Promise text, timestamp, linkContext, + isDirect, }, tabId, ); if (onChatChanged) { @@ -3406,12 +3407,13 @@ async function openChatByUsername( text?: string; timestamp?: number; linkContext?: LinkContext; + isDirect?: boolean; }, ...[tabId = getCurrentTabId()]: TabArgs ) { const { username, threadId, channelPostId, startParam, ref, startAttach, attach, text, timestamp, - linkContext, + linkContext, isDirect, } = params; const currentChat = selectCurrentChat(global, tabId); diff --git a/src/global/types/actions.ts b/src/global/types/actions.ts index b9da16c7e..db404b905 100644 --- a/src/global/types/actions.ts +++ b/src/global/types/actions.ts @@ -1,4 +1,3 @@ -import { LinkContext } from './../../api/types/messages'; import type { ApiAttachBot, ApiAttachment, @@ -677,6 +676,7 @@ export interface ActionPayloads { timestamp?: number; onChatChanged?: CallbackAction; linkContext?: LinkContext; + isDirect?: boolean; } & WithTabId; processBoostParameters: { usernameOrId: string;