Various fixes (#5439)
This commit is contained in:
parent
d61cd446b8
commit
9389014372
@ -3,7 +3,7 @@
|
||||
--color-user: var(--color-primary);
|
||||
--radius: 50%;
|
||||
--_size: 0px;
|
||||
--_font-size: max(calc(var(--_size) / 2 - 2px), 0.75rem);
|
||||
--_font-size: max(calc(var(--_size) / 2 - 2px), 0.5rem);
|
||||
|
||||
flex: none;
|
||||
align-items: center;
|
||||
|
||||
@ -50,6 +50,8 @@
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
|
||||
overflow: hidden;
|
||||
|
||||
> :global(.Transition) {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
@ -15,6 +15,7 @@
|
||||
|
||||
.self-profile .ProfileInfo {
|
||||
margin: -0.5rem 0 0.75rem -0.5rem;
|
||||
margin-inline-end: calc(min(var(--scrollbar-width) - 0.5rem, 0px));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -666,13 +666,15 @@ const Message: FC<OwnProps & StateProps> = ({
|
||||
|
||||
useEffect(() => {
|
||||
const element = ref.current;
|
||||
if (message.isDeleting && element) {
|
||||
const isPartialAlbumDelete = message.isInAlbum && album?.messages.some((msg) => !msg.isDeleting);
|
||||
if (message.isDeleting && element && !isPartialAlbumDelete) {
|
||||
if (animateSnap(element)) {
|
||||
setIsPlayingSnapAnimation(true);
|
||||
} else {
|
||||
setIsPlayingDeleteAnimation(true);
|
||||
}
|
||||
}
|
||||
// eslint-disable-next-line react-hooks-static-deps/exhaustive-deps -- Only start animation on `isDeleting` change
|
||||
}, [message.isDeleting]);
|
||||
|
||||
const textMessage = album?.hasMultipleCaptions ? undefined : (album?.captionMessage || message);
|
||||
|
||||
@ -55,7 +55,7 @@ const GiftInfoModal = ({
|
||||
}: OwnProps & StateProps) => {
|
||||
const {
|
||||
closeGiftInfoModal,
|
||||
changeGiftVisilibity,
|
||||
changeGiftVisibility,
|
||||
convertGiftToStars,
|
||||
openChatWithInfo,
|
||||
focusMessage,
|
||||
@ -97,7 +97,7 @@ const GiftInfoModal = ({
|
||||
|
||||
const handleTriggerVisibility = useLastCallback(() => {
|
||||
const { fromId, messageId, isUnsaved } = userGift!;
|
||||
changeGiftVisilibity({ userId: fromId!, messageId: messageId!, shouldUnsave: !isUnsaved });
|
||||
changeGiftVisibility({ userId: fromId!, messageId: messageId!, shouldUnsave: !isUnsaved });
|
||||
handleClose();
|
||||
});
|
||||
|
||||
|
||||
@ -9,7 +9,7 @@ import unloadVideo from '../../../util/browser/unloadVideo';
|
||||
import { preloadImage } from '../../../util/files';
|
||||
import * as mediaLoader from '../../../util/mediaLoader';
|
||||
import { getProgressiveUrl } from '../../../util/mediaLoader';
|
||||
import { makeProgressiveLoader } from '../../../util/progressieveLoader';
|
||||
import { makeProgressiveLoader } from '../../../util/progressiveLoader';
|
||||
import { pause } from '../../../util/schedulers';
|
||||
import { PRIMARY_VIDEO_MIME } from '../helpers/videoFormats';
|
||||
|
||||
|
||||
@ -222,7 +222,7 @@ addActionHandler('fulfillStarsSubscription', async (global, actions, payload): P
|
||||
actions.loadStarStatus();
|
||||
});
|
||||
|
||||
addActionHandler('changeGiftVisilibity', async (global, actions, payload): Promise<void> => {
|
||||
addActionHandler('changeGiftVisibility', async (global, actions, payload): Promise<void> => {
|
||||
const { userId, messageId, shouldUnsave } = payload;
|
||||
|
||||
const user = selectUser(global, userId);
|
||||
|
||||
@ -2302,7 +2302,7 @@ export interface ActionPayloads {
|
||||
userId: string;
|
||||
shouldRefresh?: boolean;
|
||||
};
|
||||
changeGiftVisilibity: {
|
||||
changeGiftVisibility: {
|
||||
userId: string;
|
||||
messageId: number;
|
||||
shouldUnsave?: boolean;
|
||||
|
||||
@ -5,7 +5,7 @@ import { DEBUG } from '../config';
|
||||
import { requestMutation } from '../lib/fasterdom/fasterdom';
|
||||
import { applyStyles } from '../util/animation';
|
||||
import unloadVideo from '../util/browser/unloadVideo';
|
||||
import { makeProgressiveLoader } from '../util/progressieveLoader';
|
||||
import { makeProgressiveLoader } from '../util/progressiveLoader';
|
||||
import { IS_SAFARI } from '../util/windowEnvironment';
|
||||
|
||||
const VIDEO_REVEAL_DELAY = 100;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user