Message: Fix incorrect meta position on channel posts (#4312)
This commit is contained in:
parent
a11db94e34
commit
0eecca4fb9
@ -1011,7 +1011,7 @@ export async function fetchMessageViews({
|
||||
}))
|
||||
)));
|
||||
|
||||
if (!results || results.find((result) => !result)) return undefined;
|
||||
if (!results || results.some((result) => !result)) return undefined;
|
||||
|
||||
const viewsList = results.flatMap((result) => result!.views);
|
||||
const users = results.flatMap((result) => result!.users);
|
||||
|
||||
@ -692,7 +692,7 @@ const Message: FC<OwnProps & StateProps> = ({
|
||||
asForwarded,
|
||||
hasThread: hasThread && !noComments,
|
||||
forceSenderName,
|
||||
hasComments: repliesThreadInfo && repliesThreadInfo.messagesCount > 0,
|
||||
hasCommentCounter: hasThread && repliesThreadInfo.messagesCount > 0,
|
||||
hasActionButton: canForward || canFocus,
|
||||
hasReactions,
|
||||
isGeoLiveActive: location?.type === 'geoLive' && !isGeoLiveExpired(message),
|
||||
|
||||
@ -682,7 +682,7 @@
|
||||
flex-wrap: wrap;
|
||||
align-items: flex-end;
|
||||
|
||||
&.has-comments {
|
||||
&.has-comment-counter {
|
||||
min-height: 5.25rem;
|
||||
margin-top: 0 !important;
|
||||
|
||||
|
||||
@ -12,7 +12,7 @@ export function buildContentClassName(
|
||||
asForwarded,
|
||||
hasThread,
|
||||
forceSenderName,
|
||||
hasComments,
|
||||
hasCommentCounter,
|
||||
hasActionButton,
|
||||
hasReactions,
|
||||
isGeoLiveActive,
|
||||
@ -25,7 +25,7 @@ export function buildContentClassName(
|
||||
asForwarded?: boolean;
|
||||
hasThread?: boolean;
|
||||
forceSenderName?: boolean;
|
||||
hasComments?: boolean;
|
||||
hasCommentCounter?: boolean;
|
||||
hasActionButton?: boolean;
|
||||
hasReactions?: boolean;
|
||||
isGeoLiveActive?: boolean;
|
||||
@ -69,8 +69,8 @@ export function buildContentClassName(
|
||||
classNames.push('round');
|
||||
}
|
||||
|
||||
if (hasComments) {
|
||||
classNames.push('has-comments');
|
||||
if (hasCommentCounter) {
|
||||
classNames.push('has-comment-counter');
|
||||
}
|
||||
}
|
||||
if (isMedia) {
|
||||
@ -133,7 +133,7 @@ export function buildContentClassName(
|
||||
if (!isCustomShape) {
|
||||
classNames.push('has-shadow');
|
||||
|
||||
if (isMedia && hasComments) {
|
||||
if (isMedia && hasThread) {
|
||||
classNames.push('has-background');
|
||||
}
|
||||
|
||||
|
||||
@ -1849,7 +1849,9 @@ addActionHandler('loadMessageViews', async (global, actions, payload): Promise<v
|
||||
forwardsCount: update.forwards,
|
||||
});
|
||||
|
||||
global = updateThreadInfo(global, chatId, update.id, update.threadInfo);
|
||||
if (update.threadInfo) {
|
||||
global = updateThreadInfo(global, chatId, update.id, update.threadInfo);
|
||||
}
|
||||
});
|
||||
|
||||
setGlobal(global);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user