Skip to content

Commit

Permalink
Update electron to 16.0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
indutny-signal committed Jan 4, 2022
1 parent dca2364 commit 46ddcc5
Show file tree
Hide file tree
Showing 10 changed files with 7 additions and 51 deletions.
2 changes: 1 addition & 1 deletion ACKNOWLEDGMENTS.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- Copyright 2020-2021 Signal Messenger, LLC -->
<!-- Copyright 2020-2022 Signal Messenger, LLC -->
<!-- SPDX-License-Identifier: AGPL-3.0-only -->

# Acknowledgments
Expand Down
1 change: 0 additions & 1 deletion app/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,6 @@ function prepareUrl(
appStartInitialSpellcheckSetting,
userDataPath: app.getPath('userData'),
downloadsPath: app.getPath('downloads'),
isLegacyOS: OS.isLegacy(),
homePath: app.getPath('home'),
...moreKeys,
}).href;
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 0 additions & 1 deletion preload.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
};
Expand Down
13 changes: 0 additions & 13 deletions ts/OS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};
21 changes: 0 additions & 21 deletions ts/components/Lightbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion ts/components/conversation/GIF.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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)}
Expand Down
7 changes: 0 additions & 7 deletions ts/components/conversation/MessageAudio.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,13 @@ 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';
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 = {
Expand Down Expand Up @@ -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) {
Expand Down
1 change: 0 additions & 1 deletion ts/window.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,6 @@ declare global {
imageToBlurHash: typeof imageToBlurHash;
loadImage: any;
isBehindProxy: () => boolean;
isLegacyOS: () => boolean;
getAutoLaunch: () => Promise<boolean>;
setAutoLaunch: (value: boolean) => Promise<void>;

Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 46ddcc5

Please sign in to comment.