mirror of
https://github.com/finos/SymphonyElectron.git
synced 2025-02-25 18:55:29 -06:00
SDA-4657: OpenFin - unregisterIntentHandler patch (#2273)
This commit is contained in:
parent
599a2f3ff1
commit
17d1a6a96d
@ -673,7 +673,7 @@ describe('main api handler', () => {
|
||||
const spy = jest.spyOn(openfinHandler, 'unregisterIntentHandler');
|
||||
const value = {
|
||||
cmd: apiCmds.openfinUnregisterIntentHandler,
|
||||
intentName: 'ViewContact',
|
||||
uuid: 'uuid',
|
||||
};
|
||||
|
||||
ipcMain.send(apiName.symphonyApi, value);
|
||||
|
@ -649,7 +649,7 @@ ipcMain.handle(
|
||||
case apiCmds.openfinJoinSessionContextGroup:
|
||||
return openfinHandler.joinSessionContextGroup(arg.contextGroupId);
|
||||
case apiCmds.openfinUnregisterIntentHandler:
|
||||
return openfinHandler.unregisterIntentHandler(arg.intentName);
|
||||
return openfinHandler.unregisterIntentHandler(arg.uuid);
|
||||
case apiCmds.openfinFireIntentForContext:
|
||||
return openfinHandler.fireIntentForContext(arg.context);
|
||||
case apiCmds.openfinRemoveFromContextGroup:
|
||||
|
@ -118,10 +118,12 @@ export class OpenfinHandler {
|
||||
/**
|
||||
* Removes an intent handler for a given intent
|
||||
*/
|
||||
public unregisterIntentHandler(uuid: UUID) {
|
||||
public async unregisterIntentHandler(uuid: UUID) {
|
||||
const unsubscriptionCallback = this.intentHandlerSubscriptions.get(uuid);
|
||||
unsubscriptionCallback.unsubscribe();
|
||||
|
||||
const response = await unsubscriptionCallback.unsubscribe();
|
||||
this.intentHandlerSubscriptions.delete(uuid);
|
||||
return response;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -1070,7 +1070,7 @@ export class SSFApi {
|
||||
|
||||
const response = await local.ipcRenderer.invoke(apiName.symphonyApi, {
|
||||
cmd: apiCmds.openfinUnregisterIntentHandler,
|
||||
callbackId,
|
||||
uuid: callbackId,
|
||||
});
|
||||
return response;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user