Message / Quick Reaction: Fix button getting stuck (#3471)

This commit is contained in:
Alexander Zinchuk 2023-07-05 13:15:53 +02:00
parent b7b8feb07d
commit a5486b9ada

View File

@ -1,6 +1,6 @@
import type { FC } from '../../../lib/teact/teact';
import React, {
memo, useEffect, useMemo, useRef, useState,
memo, useCallback, useEffect, useMemo, useRef, useState,
} from '../../../lib/teact/teact';
import { getActions, withGlobal } from '../../../global';
import type {
@ -800,7 +800,7 @@ const Message: FC<OwnProps & StateProps> = ({
);
}
const renderQuickReactionButton = useLastCallback(() => {
const renderQuickReactionButton = useCallback(() => {
if (!defaultReaction) return undefined;
return (
@ -817,7 +817,10 @@ const Message: FC<OwnProps & StateProps> = ({
/>
</div>
);
});
}, [
activeReactions, availableReactions, defaultReaction, handleSendQuickReaction, isQuickReactionVisible,
observeIntersectionForPlaying,
]);
function renderReactionsAndMeta() {
const meta = (