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