diff --git a/src/api/gramjs/methods/messages.ts b/src/api/gramjs/methods/messages.ts index bcad3bd86..97239a911 100644 --- a/src/api/gramjs/methods/messages.ts +++ b/src/api/gramjs/methods/messages.ts @@ -914,6 +914,7 @@ export async function requestThreadInfoUpdate({ topMessageId, lastReadInboxMessageId: topMessageResult.readInboxMaxId, messagesCount: (repliesResult instanceof GramJs.messages.ChannelMessages) ? repliesResult.count : undefined, + lastMessageId: topMessageResult.maxId, ...(originChannelId ? { originChannelId } : undefined), }, firstMessageId: repliesResult && 'messages' in repliesResult && repliesResult.messages.length diff --git a/src/components/middle/MiddleColumn.tsx b/src/components/middle/MiddleColumn.tsx index 3b4c56ca1..990745459 100644 --- a/src/components/middle/MiddleColumn.tsx +++ b/src/components/middle/MiddleColumn.tsx @@ -25,6 +25,7 @@ import { ANIMATION_LEVEL_MIN, SUPPORTED_IMAGE_CONTENT_TYPES, GENERAL_TOPIC_ID, + TMP_CHAT_ID, } from '../../config'; import { MASK_IMAGE_DISABLED } from '../../util/environment'; import { DropAreaState } from './composer/DropArea'; @@ -222,9 +223,9 @@ const MiddleColumn: FC = ({ const renderingCanStartBot = usePrevDuringAnimation(canStartBot, closeAnimationDuration); const renderingCanRestartBot = usePrevDuringAnimation(canRestartBot, closeAnimationDuration); const renderingCanPost = usePrevDuringAnimation(canPost, closeAnimationDuration) - && !renderingCanRestartBot && !renderingCanStartBot && !renderingCanSubscribe; + && !renderingCanRestartBot && !renderingCanStartBot && !renderingCanSubscribe && chatId !== TMP_CHAT_ID; const renderingHasTools = usePrevDuringAnimation(hasTools, closeAnimationDuration); - const renderingIsFabShown = usePrevDuringAnimation(isFabShown, closeAnimationDuration); + const renderingIsFabShown = usePrevDuringAnimation(isFabShown, closeAnimationDuration) && chatId !== TMP_CHAT_ID; const renderingIsChannel = usePrevDuringAnimation(isChannel, closeAnimationDuration); const renderingShouldJoinToSend = usePrevDuringAnimation(shouldJoinToSend, closeAnimationDuration); const renderingShouldSendJoinRequest = usePrevDuringAnimation(shouldSendJoinRequest, closeAnimationDuration);