Update electron to 16.0.6

This commit is contained in:
Fedor Indutny 2022-01-03 17:43:42 -08:00 committed by GitHub
parent dca2364ba4
commit 46ddcc50f9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 7 additions and 51 deletions

View file

@ -1,4 +1,4 @@
<!-- Copyright 2020-2021 Signal Messenger, LLC -->
<!-- Copyright 2020-2022 Signal Messenger, LLC -->
<!-- SPDX-License-Identifier: AGPL-3.0-only -->
# Acknowledgments

View file

@ -325,7 +325,6 @@ function prepareUrl(
appStartInitialSpellcheckSetting,
userDataPath: app.getPath('userData'),
downloadsPath: app.getPath('downloads'),
isLegacyOS: OS.isLegacy(),
homePath: app.getPath('home'),
...moreKeys,
}).href;

View file

@ -257,7 +257,7 @@
"core-js": "2.6.9",
"cross-env": "5.2.0",
"css-loader": "3.2.0",
"electron": "16.0.4",
"electron": "16.0.6",
"electron-builder": "22.14.5",
"electron-mocha": "11.0.2",
"electron-notarize": "0.1.1",

View file

@ -70,7 +70,6 @@ try {
window.getServerPublicParams = () => config.serverPublicParams;
window.getSfuUrl = () => config.sfuUrl;
window.isBehindProxy = () => Boolean(config.proxyUrl);
window.isLegacyOS = () => config.isLegacyOS === 'true';
window.getAutoLaunch = () => {
return ipc.invoke('get-auto-launch');
};

View file

@ -16,16 +16,3 @@ export const isWindows = (minVersion?: string): boolean => {
return is.undefined(minVersion) ? true : semver.gte(osRelease, minVersion);
};
export const isLegacy = (): boolean => {
if (process.platform === 'darwin') {
// 17.0.0 - is macOS 10.13
return semver.lt(os.release(), '17.0.0');
}
if (process.platform === 'win32') {
return semver.lt(os.release(), '9.0.0');
}
return false;
};

View file

@ -18,10 +18,8 @@ import { IMAGE_PNG, isImage, isVideo } from '../types/MIME';
import type { LocalizerType } from '../types/Util';
import type { MediaItemType, MessageAttributesType } from '../types/MediaItem';
import { formatDuration } from '../util/formatDuration';
import { showToast } from '../util/showToast';
import { useRestoreFocus } from '../hooks/useRestoreFocus';
import * as log from '../logging/log';
import { ToastUnableToLoadAttachment } from './ToastUnableToLoadAttachment';
export type PropsType = {
children?: ReactNode;
@ -455,25 +453,6 @@ export function Lightbox({
/>
);
}
} else if (isVideoTypeSupported && window.isLegacyOS()) {
const onLegacyClick = (event: React.MouseEvent<HTMLVideoElement>) => {
event.preventDefault();
event.stopPropagation();
showToast(ToastUnableToLoadAttachment);
};
content = (
<video
className="Lightbox__object"
controls={false}
key={objectURL}
loop={false}
onClick={onLegacyClick}
>
<source src={objectURL} />
</video>
);
} else if (isVideoTypeSupported) {
const shouldLoop = loop || isAttachmentGIF || isViewOnce;

View file

@ -178,7 +178,7 @@ export const GIF: React.FC<Props> = props => {
}
let gif: JSX.Element | undefined;
if (isNotDownloaded || isPending || window.isLegacyOS()) {
if (isNotDownloaded || isPending) {
gif = (
<Blurhash
hash={attachment.blurHash || defaultBlurHash(theme)}

View file

@ -6,7 +6,6 @@ import classNames from 'classnames';
import { noop } from 'lodash';
import { assert } from '../../util/assert';
import { showToast } from '../../util/showToast';
import type { LocalizerType } from '../../types/Util';
import type { AttachmentType } from '../../types/Attachment';
import { hasNotDownloaded } from '../../types/Attachment';
@ -14,7 +13,6 @@ import type { DirectionType, MessageStatusType } from './Message';
import type { ComputePeaksResult } from '../GlobalAudioContext';
import { MessageMetadata } from './MessageMetadata';
import { ToastUnableToLoadAttachment } from '../ToastUnableToLoadAttachment';
import * as log from '../../logging/log';
export type Props = {
@ -352,11 +350,6 @@ export const MessageAudio: React.FC<Props> = (props: Props) => {
}, [id, audio, isActive, isPlaying, currentTime]);
const toggleIsPlaying = () => {
if (window.isLegacyOS()) {
showToast(ToastUnableToLoadAttachment);
return;
}
setIsPlaying(!isPlaying);
if (!isActive && !isPlaying) {

1
ts/window.d.ts vendored
View file

@ -197,7 +197,6 @@ declare global {
imageToBlurHash: typeof imageToBlurHash;
loadImage: any;
isBehindProxy: () => boolean;
isLegacyOS: () => boolean;
getAutoLaunch: () => Promise<boolean>;
setAutoLaunch: (value: boolean) => Promise<void>;

View file

@ -5991,10 +5991,10 @@ electron-window@^0.8.0:
dependencies:
is-electron-renderer "^2.0.0"
electron@16.0.4:
version "16.0.4"
resolved "https://registry.yarnpkg.com/electron/-/electron-16.0.4.tgz#87dfe21d17608537fc6df292c437362297566a73"
integrity sha512-IptwmowvMP1SFOmZLh6rrURwfnOxbDBXBRBcaOdfBM5I+B9mgtdNwzNC3ymFFNzEkZUwdOyg9fu3iyjAAQIQgw==
electron@16.0.6:
version "16.0.6"
resolved "https://registry.yarnpkg.com/electron/-/electron-16.0.6.tgz#d7a420ef2cb39d7d0a4d8760c03d72b137a033d5"
integrity sha512-Xs9dYLYhcJf3wXn8m2gDqFTb1L862KEhMxOx9swfFBHj6NoUPPtUgw/RyPQ0tXN1XPxG9vnBkoI0BdcKwrLKuQ==
dependencies:
"@electron/get" "^1.13.0"
"@types/node" "^14.6.2"