mirror of
https://github.com/pavlobu/deskreen.git
synced 2025-05-28 05:10:09 -07:00
remove .remote from preview grid list
This commit is contained in:
parent
42cb2a28e2
commit
5188c499cf
@ -1,12 +1,8 @@
|
||||
import React from 'react';
|
||||
import { remote } from 'electron';
|
||||
import { ipcRenderer } from 'electron';
|
||||
import { Row, Col } from 'react-flexbox-grid';
|
||||
import SharingSessionService from '../../../features/SharingSessionService';
|
||||
import SharingSourcePreviewCard from '../../SharingSourcePreviewCard';
|
||||
|
||||
const sharingSessionService = remote.getGlobal(
|
||||
'sharingSessionService'
|
||||
) as SharingSessionService;
|
||||
import { IpcEvents } from '../../../main/IpcEvents.enum';
|
||||
|
||||
class PreviewGridListProps {
|
||||
viewSharingIds: string[] = [];
|
||||
@ -41,15 +37,7 @@ export default function PreviewGridList(props: PreviewGridListProps) {
|
||||
sharingSourceID={id}
|
||||
isChangeApperanceOnHover
|
||||
onClickCard={async () => {
|
||||
let sharingSession;
|
||||
if (
|
||||
sharingSessionService.waitingForConnectionSharingSession !==
|
||||
null
|
||||
) {
|
||||
sharingSession =
|
||||
sharingSessionService.waitingForConnectionSharingSession;
|
||||
sharingSession.setDesktopCapturerSourceID(id);
|
||||
}
|
||||
ipcRenderer.invoke(IpcEvents.SetDesktopCapturerSourceId, id);
|
||||
if (isEntireScreen) {
|
||||
handleNextEntireScreen();
|
||||
} else {
|
||||
|
@ -19,4 +19,5 @@ export enum IpcEvents {
|
||||
GetPendingConnectionDevice = 'get-pending-connection-device',
|
||||
GetWaitingForConnectionSharingSessionRoomId = 'get-waiting-for-connection-sharing-session-room-id',
|
||||
GetDesktopSharingSourceIds = 'get-desktop-sharing-source-ids',
|
||||
SetDesktopCapturerSourceId = 'set-desktop-capturer-source-id',
|
||||
}
|
||||
|
@ -260,4 +260,10 @@ export default function initIpcMainHandlers(
|
||||
.map((source) => source.id);
|
||||
}
|
||||
);
|
||||
|
||||
ipcMain.handle(IpcEvents.SetDesktopCapturerSourceId, (_, id) => {
|
||||
getDeskreenGlobal().sharingSessionService.waitingForConnectionSharingSession?.setDesktopCapturerSourceID(
|
||||
id
|
||||
);
|
||||
});
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user