Update electron to 16.0.6

Co-authored-by: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com>
This commit is contained in:
automated-signal 2022-01-04 07:18:40 -08:00 committed by GitHub
parent 1269b14fd1
commit b20d7d5e8a
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

@ -256,7 +256,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

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

View File

@ -6848,10 +6848,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"