[Perf] Disable mask image even on iOS

This commit is contained in:
Alexander Zinchuk 2021-05-09 03:11:45 +03:00
parent 75d72fe884
commit d11f336bb0
2 changed files with 3 additions and 4 deletions

View File

@ -16,7 +16,7 @@ import {
ANIMATION_LEVEL_MAX,
ANIMATION_END_DELAY,
} from '../../config';
import { IS_MOBILE_SCREEN, IS_TOUCH_ENV, MASK_IMAGE_ENABLED } from '../../util/environment';
import { IS_MOBILE_SCREEN, IS_TOUCH_ENV, MASK_IMAGE_DISABLED } from '../../util/environment';
import { DropAreaState } from './composer/DropArea';
import {
selectChat,
@ -173,7 +173,7 @@ const MiddleColumn: FC<StateProps & DispatchProps> = ({
customBackground && !isCustomBackgroundColor && 'custom-bg-image',
customBackground && isCustomBackgroundColor && 'custom-bg-color',
customBackground && isBackgroundBlurred && 'blurred',
MASK_IMAGE_ENABLED ? 'mask-image-enabled' : 'mask-image-disabled',
MASK_IMAGE_DISABLED ? 'mask-image-disabled' : 'mask-image-enabled',
);
const messagingDisabledClassName = buildClassName(

View File

@ -50,8 +50,7 @@ export const IS_OPUS_SUPPORTED = Boolean((new Audio()).canPlayType('audio/ogg; c
export const DPR = window.devicePixelRatio || 1;
// `mask-image` CSS property for custom background slows down the scroll performance significantly
export const MASK_IMAGE_ENABLED = IS_IOS;
export const MASK_IMAGE_DISABLED = true;
let isWebpSupportedCache: boolean | undefined;