Remove unnecessary dialog on macOS Sequoia

Co-authored-by: Fedor Indutny <79877362+indutny-signal@users.noreply.github.com>
This commit is contained in:
automated-signal 2024-10-02 16:01:49 -05:00 committed by GitHub
parent 4b185d4883
commit 89e6fc6283
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -6,6 +6,7 @@ import {
hasScreenCapturePermission,
openSystemPreferences,
} from 'mac-screen-capture-permissions';
import { isSupported as isNativeMacScreenShareSupported } from '@indutny/mac-screen-share';
import { omit } from 'lodash';
import type { ReadonlyDeep } from 'type-fest';
import {
@ -1316,7 +1317,9 @@ function getPresentingSources(): ThunkAction<
// capture that state correctly.
const platform = getPlatform(getState());
const needsPermission =
platform === 'darwin' && !hasScreenCapturePermission();
platform === 'darwin' &&
!isNativeMacScreenShareSupported &&
!hasScreenCapturePermission();
const capturer = new DesktopCapturer({
i18n,