Fix raised hand list button hiding after fade out
This commit is contained in:
parent
6c38823b50
commit
a184fd377f
1 changed files with 5 additions and 8 deletions
|
@ -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,
|
||||
]);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue