Upgrade Electron to 28.1.5
Co-authored-by: Fedor Indutny <238531+indutny@users.noreply.github.com>
This commit is contained in:
parent
d97aa68716
commit
2bc0e4755c
24 changed files with 421 additions and 296 deletions
|
@ -11,6 +11,7 @@ import type { ServiceIdString } from '../types/ServiceId';
|
|||
import type { LocalizerType } from '../types/Util';
|
||||
import type { ConversationType } from '../state/ducks/conversations';
|
||||
import { ModalHost } from './ModalHost';
|
||||
import { drop } from '../util/drop';
|
||||
import * as log from '../logging/log';
|
||||
import { usePrevious } from '../hooks/usePrevious';
|
||||
|
||||
|
@ -200,19 +201,27 @@ export function CallingRaisedHandsListButton({
|
|||
if (raisedHandsCount > prevRaisedHandsCount) {
|
||||
setIsVisible(true);
|
||||
opacitySpringApi.stop();
|
||||
opacitySpringApi.start({ opacity: 1 });
|
||||
drop(Promise.all(opacitySpringApi.start({ opacity: 1 })));
|
||||
scaleSpringApi.stop();
|
||||
scaleSpringApi.start({
|
||||
from: { scale: 0.99 },
|
||||
to: { scale: 1 },
|
||||
config: { velocity: 0.0025 },
|
||||
});
|
||||
drop(
|
||||
Promise.all(
|
||||
scaleSpringApi.start({
|
||||
from: { scale: 0.99 },
|
||||
to: { scale: 1 },
|
||||
config: { velocity: 0.0025 },
|
||||
})
|
||||
)
|
||||
);
|
||||
} else if (raisedHandsCount === 0) {
|
||||
opacitySpringApi.stop();
|
||||
opacitySpringApi.start({
|
||||
to: { opacity: 0 },
|
||||
onRest: () => onRestAfterAnimateOut,
|
||||
});
|
||||
drop(
|
||||
Promise.all(
|
||||
opacitySpringApi.start({
|
||||
to: { opacity: 0 },
|
||||
onRest: () => onRestAfterAnimateOut,
|
||||
})
|
||||
)
|
||||
);
|
||||
}
|
||||
}, [
|
||||
raisedHandsCount,
|
||||
|
|
|
@ -641,7 +641,6 @@ export function LeftPane({
|
|||
'module-left-pane--mode-compose'
|
||||
)}
|
||||
>
|
||||
{/* eslint-enable jsx-a11y/no-static-element-interactions */}
|
||||
<div className="module-left-pane__header">
|
||||
{helper.getHeaderContents({
|
||||
i18n,
|
||||
|
|
|
@ -26,6 +26,7 @@ import { isGIF } from '../types/Attachment';
|
|||
import { useRestoreFocus } from '../hooks/useRestoreFocus';
|
||||
import { usePrevious } from '../hooks/usePrevious';
|
||||
import { arrow } from '../util/keyboard';
|
||||
import { drop } from '../util/drop';
|
||||
import { isCmdOrCtrl } from '../hooks/useKeyboardShortcuts';
|
||||
|
||||
export type PropsType = {
|
||||
|
@ -327,10 +328,14 @@ export function Lightbox({
|
|||
(selectedIndex === 0 ? 1 : -1) * THUMBNAIL_FULL_WIDTH,
|
||||
opacity: 0,
|
||||
});
|
||||
thumbnailsAnimation.start({
|
||||
marginInlineStart: thumbnailsMarginInlineStart,
|
||||
opacity: 1,
|
||||
});
|
||||
drop(
|
||||
Promise.all(
|
||||
thumbnailsAnimation.start({
|
||||
marginInlineStart: thumbnailsMarginInlineStart,
|
||||
opacity: 1,
|
||||
})
|
||||
)
|
||||
);
|
||||
}, [
|
||||
needsAnimation,
|
||||
selectedIndex,
|
||||
|
@ -375,11 +380,15 @@ export function Lightbox({
|
|||
const posY = offsetY * ZOOM_SCALE;
|
||||
const [x, y] = maxBoundsLimiter(posX, posY);
|
||||
|
||||
springApi.start({
|
||||
scale: ZOOM_SCALE,
|
||||
translateX: shouldTranslateX ? x : undefined,
|
||||
translateY: shouldTranslateY ? y : undefined,
|
||||
});
|
||||
drop(
|
||||
Promise.all(
|
||||
springApi.start({
|
||||
scale: ZOOM_SCALE,
|
||||
translateX: shouldTranslateX ? x : undefined,
|
||||
translateY: shouldTranslateY ? y : undefined,
|
||||
})
|
||||
)
|
||||
);
|
||||
},
|
||||
[maxBoundsLimiter, springApi]
|
||||
);
|
||||
|
@ -414,11 +423,15 @@ export function Lightbox({
|
|||
const x = dragCache.translateX + deltaX;
|
||||
const y = dragCache.translateY + deltaY;
|
||||
|
||||
springApi.start({
|
||||
scale: ZOOM_SCALE,
|
||||
translateX: x,
|
||||
translateY: y,
|
||||
});
|
||||
drop(
|
||||
Promise.all(
|
||||
springApi.start({
|
||||
scale: ZOOM_SCALE,
|
||||
translateX: x,
|
||||
translateY: y,
|
||||
})
|
||||
)
|
||||
);
|
||||
},
|
||||
[springApi]
|
||||
);
|
||||
|
@ -459,15 +472,19 @@ export function Lightbox({
|
|||
const posY = -offsetY * ZOOM_SCALE + translateY.get();
|
||||
const [x, y] = maxBoundsLimiter(posX, posY);
|
||||
|
||||
springApi.start({
|
||||
scale: ZOOM_SCALE,
|
||||
translateX: shouldTranslateX ? x : undefined,
|
||||
translateY: shouldTranslateY ? y : undefined,
|
||||
});
|
||||
drop(
|
||||
Promise.all(
|
||||
springApi.start({
|
||||
scale: ZOOM_SCALE,
|
||||
translateX: shouldTranslateX ? x : undefined,
|
||||
translateY: shouldTranslateY ? y : undefined,
|
||||
})
|
||||
)
|
||||
);
|
||||
|
||||
setIsZoomed(true);
|
||||
} else {
|
||||
springApi.start(INITIAL_IMAGE_TRANSFORM);
|
||||
drop(Promise.all(springApi.start(INITIAL_IMAGE_TRANSFORM)));
|
||||
setIsZoomed(false);
|
||||
}
|
||||
},
|
||||
|
|
|
@ -7,6 +7,7 @@ import React, { useEffect, useState } from 'react';
|
|||
import { animated, useSpring } from '@react-spring/web';
|
||||
|
||||
import type { LocalizerType } from '../../types/Util';
|
||||
import { drop } from '../../util/drop';
|
||||
import { TimelineDateHeader } from './TimelineDateHeader';
|
||||
import { Spinner } from '../Spinner';
|
||||
|
||||
|
@ -57,7 +58,7 @@ export function TimelineFloatingHeader({
|
|||
}
|
||||
|
||||
if (!isLoading && showSpinner) {
|
||||
spinnerSpringRef.start();
|
||||
drop(Promise.all(spinnerSpringRef.start()));
|
||||
}
|
||||
|
||||
if (!isLoading && !showSpinner) {
|
||||
|
|
|
@ -12,6 +12,7 @@ import { Avatar } from '../Avatar';
|
|||
import type { LocalizerType, ThemeType } from '../../types/Util';
|
||||
import type { ConversationType } from '../../state/ducks/conversations';
|
||||
import type { PreferredBadgeSelectorType } from '../../state/selectors/badges';
|
||||
import { drop } from '../../util/drop';
|
||||
|
||||
const MAX_AVATARS_COUNT = 3;
|
||||
|
||||
|
@ -104,7 +105,11 @@ function TypingBubbleAvatar({
|
|||
|
||||
useEffect(() => {
|
||||
springApi.stop();
|
||||
springApi.start(AVATAR_ANIMATION_PROPS[visible ? 'visible' : 'hidden']);
|
||||
drop(
|
||||
Promise.all(
|
||||
springApi.start(AVATAR_ANIMATION_PROPS[visible ? 'visible' : 'hidden'])
|
||||
)
|
||||
);
|
||||
}, [visible, springApi]);
|
||||
|
||||
if (!contact) {
|
||||
|
@ -308,12 +313,20 @@ export function TypingBubble({
|
|||
setIsVisible(true);
|
||||
}
|
||||
typingAnimationSpringApi.stop();
|
||||
typingAnimationSpringApi.start(
|
||||
BUBBLE_ANIMATION_PROPS[isSomeoneTyping ? 'visible' : 'hidden']
|
||||
drop(
|
||||
Promise.all(
|
||||
typingAnimationSpringApi.start(
|
||||
BUBBLE_ANIMATION_PROPS[isSomeoneTyping ? 'visible' : 'hidden']
|
||||
)
|
||||
)
|
||||
);
|
||||
outerDivSpringApi.stop();
|
||||
outerDivSpringApi.start(
|
||||
OUTER_DIV_ANIMATION_PROPS[isSomeoneTyping ? 'visible' : 'hidden']
|
||||
drop(
|
||||
Promise.all(
|
||||
outerDivSpringApi.start(
|
||||
OUTER_DIV_ANIMATION_PROPS[isSomeoneTyping ? 'visible' : 'hidden']
|
||||
)
|
||||
)
|
||||
);
|
||||
}, [isSomeoneTyping, typingAnimationSpringApi, outerDivSpringApi]);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue