Message List: Fix incorrect position of sticky date in pinned list
This commit is contained in:
parent
a2492b369b
commit
e81dd51872
@ -77,7 +77,7 @@ type StateProps = {
|
|||||||
canPost?: boolean;
|
canPost?: boolean;
|
||||||
currentUserBannedRights?: ApiChatBannedRights;
|
currentUserBannedRights?: ApiChatBannedRights;
|
||||||
defaultBannedRights?: ApiChatBannedRights;
|
defaultBannedRights?: ApiChatBannedRights;
|
||||||
hasPinnedOrAudioMessage?: boolean;
|
hasPinnedOrAudioPlayer?: boolean;
|
||||||
pinnedMessagesCount?: number;
|
pinnedMessagesCount?: number;
|
||||||
theme: ThemeKey;
|
theme: ThemeKey;
|
||||||
customBackground?: string;
|
customBackground?: string;
|
||||||
@ -121,7 +121,7 @@ const MiddleColumn: FC<StateProps & DispatchProps> = ({
|
|||||||
canPost,
|
canPost,
|
||||||
currentUserBannedRights,
|
currentUserBannedRights,
|
||||||
defaultBannedRights,
|
defaultBannedRights,
|
||||||
hasPinnedOrAudioMessage,
|
hasPinnedOrAudioPlayer,
|
||||||
pinnedMessagesCount,
|
pinnedMessagesCount,
|
||||||
customBackground,
|
customBackground,
|
||||||
theme,
|
theme,
|
||||||
@ -161,7 +161,7 @@ const MiddleColumn: FC<StateProps & DispatchProps> = ({
|
|||||||
const [isUnpinModalOpen, setIsUnpinModalOpen] = useState(false);
|
const [isUnpinModalOpen, setIsUnpinModalOpen] = useState(false);
|
||||||
const [isReady, setIsReady] = useState(!IS_SINGLE_COLUMN_LAYOUT || animationLevel === ANIMATION_LEVEL_MIN);
|
const [isReady, setIsReady] = useState(!IS_SINGLE_COLUMN_LAYOUT || animationLevel === ANIMATION_LEVEL_MIN);
|
||||||
|
|
||||||
const hasTools = hasPinnedOrAudioMessage && (
|
const hasTools = hasPinnedOrAudioPlayer && (
|
||||||
windowWidth < MOBILE_SCREEN_MAX_WIDTH
|
windowWidth < MOBILE_SCREEN_MAX_WIDTH
|
||||||
|| (
|
|| (
|
||||||
isRightColumnShown && windowWidth > MIN_SCREEN_WIDTH_FOR_STATIC_RIGHT_COLUMN
|
isRightColumnShown && windowWidth > MIN_SCREEN_WIDTH_FOR_STATIC_RIGHT_COLUMN
|
||||||
@ -556,9 +556,9 @@ export default memo(withGlobal(
|
|||||||
isScheduledMessageList,
|
isScheduledMessageList,
|
||||||
currentUserBannedRights: chat?.currentUserBannedRights,
|
currentUserBannedRights: chat?.currentUserBannedRights,
|
||||||
defaultBannedRights: chat?.defaultBannedRights,
|
defaultBannedRights: chat?.defaultBannedRights,
|
||||||
hasPinnedOrAudioMessage: (
|
hasPinnedOrAudioPlayer: (
|
||||||
threadId !== MAIN_THREAD_ID
|
threadId !== MAIN_THREAD_ID
|
||||||
|| Boolean(pinnedIds?.length)
|
|| Boolean(!isPinnedMessageList && pinnedIds?.length)
|
||||||
|| Boolean(audioChatId && audioMessageId)
|
|| Boolean(audioChatId && audioMessageId)
|
||||||
),
|
),
|
||||||
pinnedMessagesCount: pinnedIds ? pinnedIds.length : 0,
|
pinnedMessagesCount: pinnedIds ? pinnedIds.length : 0,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user