[MM-51961] Migrate calls widget to singleton (#2667)
* Migrate callsWidgetWindow to singleton * REVERT ME: removed references to ServerManager
This commit is contained in:
@@ -25,6 +25,7 @@ jest.mock('electron', () => ({
|
||||
jest.mock('main/contextMenu', () => jest.fn());
|
||||
|
||||
jest.mock('../allowProtocolDialog', () => ({}));
|
||||
jest.mock('main/windows/callsWidgetWindow', () => ({}));
|
||||
jest.mock('main/views/viewManager', () => ({
|
||||
getViewByWebContentsId: jest.fn(),
|
||||
getViewByURL: jest.fn(),
|
||||
|
@@ -10,7 +10,8 @@ import urlUtils from 'common/utils/url';
|
||||
import {flushCookiesStore} from 'main/app/utils';
|
||||
import ContextMenu from 'main/contextMenu';
|
||||
|
||||
import WindowManager from '../windows/windowManager';
|
||||
import CallsWidgetWindow from 'main/windows/callsWidgetWindow';
|
||||
import WindowManager from 'main/windows/windowManager';
|
||||
|
||||
import {protocols} from '../../../electron-builder.json';
|
||||
|
||||
@@ -84,7 +85,7 @@ export class WebContentsEventManager {
|
||||
return;
|
||||
}
|
||||
|
||||
const callID = WindowManager.callsWidgetWindow?.getCallID();
|
||||
const callID = CallsWidgetWindow.callID;
|
||||
if (serverURL && callID && urlUtils.isCallsPopOutURL(serverURL, parsedURL, callID)) {
|
||||
return;
|
||||
}
|
||||
|
Reference in New Issue
Block a user