mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-24 20:26:24 +00:00
Fix raised hand list button hiding after fade out
This commit is contained in:
@@ -203,12 +203,6 @@ export function CallingRaisedHandsListButton({
|
||||
syncedLocalHandRaised
|
||||
);
|
||||
|
||||
const onRestAfterAnimateOut = React.useCallback(() => {
|
||||
if (!raisedHandsCount) {
|
||||
setIsVisible(false);
|
||||
}
|
||||
}, [raisedHandsCount]);
|
||||
|
||||
React.useEffect(() => {
|
||||
if (raisedHandsCount > prevRaisedHandsCount) {
|
||||
setIsVisible(true);
|
||||
@@ -230,7 +224,11 @@ export function CallingRaisedHandsListButton({
|
||||
Promise.all(
|
||||
opacitySpringApi.start({
|
||||
to: { opacity: 0 },
|
||||
onRest: () => onRestAfterAnimateOut,
|
||||
onRest: () => {
|
||||
if (!raisedHandsCount) {
|
||||
setIsVisible(false);
|
||||
}
|
||||
},
|
||||
})
|
||||
)
|
||||
);
|
||||
@@ -240,7 +238,6 @@ export function CallingRaisedHandsListButton({
|
||||
prevRaisedHandsCount,
|
||||
opacitySpringApi,
|
||||
scaleSpringApi,
|
||||
onRestAfterAnimateOut,
|
||||
setIsVisible,
|
||||
]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user