This commit is contained in:
Alexander Zinchuk 2023-09-28 01:54:02 +02:00
parent d4d3d70463
commit 697adc3a14
7 changed files with 20 additions and 19 deletions

View File

@ -216,11 +216,6 @@
max-width: 80%;
text-align: left;
}
.text-entity-link {
color: inherit !important;
text-decoration: underline !important;
}
}
.sticky-date,

View File

@ -11,8 +11,8 @@
display: flex;
flex-direction: column;
background: var(--pattern-color);
color: white;
background-color: var(--color-background);
color: var(--color-text);
font-size: calc(var(--message-text-size, 1rem) - 0.0625rem);
line-height: 1.75;
border-radius: var(--border-radius-messages);
@ -28,3 +28,8 @@
font-weight: 500;
margin-bottom: 0.25rem;
}
.image {
max-width: 100%;
height: auto;
}

View File

@ -70,6 +70,7 @@ const MessageListBotInfo: FC<OwnProps & StateProps> = ({
>
{botInfoPhotoUrl && (
<img
className={styles.image}
src={botInfoPhotoUrl}
width={botInfoRealDimensions?.width}
height={botInfoRealDimensions?.height}

View File

@ -1,3 +1,5 @@
@import "../../../styles/mixins";
.BotKeyboardMenu {
.bubble {
width: 100% !important;
@ -9,12 +11,9 @@
display: flex;
flex-direction: column;
padding: 0.1875rem 0.625rem;
max-height: 80vh;
overflow: auto;
@media (max-width: 600px) {
max-height: 75vh;
}
max-height: 75vh;
overflow-y: scroll;
@include adapt-padding-to-scrollbar(0.625rem);
.row {
display: flex;

View File

@ -49,7 +49,7 @@ const BotKeyboardMenu: FC<OwnProps & StateProps> = ({
onMouseLeave={!IS_TOUCH_ENV ? handleMouseLeave : undefined}
noCompact
>
<div className="content">
<div className="content custom-scroll">
{message.keyboardButtons.map((row) => (
<div className="row">
{row.map((button) => (

View File

@ -1132,7 +1132,8 @@ addActionHandler('openChatByUsername', async (global, actions, payload): Promise
const isWebApp = webAppName && !Number(webAppName) && !originalParts?.[2];
if (!commentId) {
if (!startAttach && messageId && !startParam && chat?.usernames?.some((c) => c.username === username)) {
if (startAttach === undefined && messageId && !startParam
&& chat?.usernames?.some((c) => c.username === username)) {
actions.focusMessage({
chatId: chat.id, threadId, messageId, tabId,
});
@ -2559,7 +2560,7 @@ async function openChatByUsername<T extends GlobalState>(
threadId?: number,
channelPostId?: number,
startParam?: string,
startAttach?: string | boolean,
startAttach?: string,
attach?: string,
...[tabId = getCurrentTabId()]: TabArgs<T>
) {
@ -2567,7 +2568,7 @@ async function openChatByUsername<T extends GlobalState>(
const currentChat = selectCurrentChat(global, tabId);
// Attach in the current chat
if (startAttach && !attach) {
if (startAttach !== undefined && !attach) {
const bot = await getAttachBotOrNotify(global, actions, username, tabId);
if (!currentChat || !bot) return;
@ -2575,7 +2576,7 @@ async function openChatByUsername<T extends GlobalState>(
actions.callAttachBot({
bot,
chatId: currentChat.id,
...(typeof startAttach === 'string' && { startParam: startAttach }),
startParam: startAttach,
tabId,
});

View File

@ -1353,7 +1353,7 @@ export interface ActionPayloads {
messageId?: number;
commentId?: number;
startParam?: string;
startAttach?: string | boolean;
startAttach?: string;
attach?: string;
startApp?: string;
originalParts?: string[];