cluster-view battling -- part 2

Signed-off-by: Roman <ixrock@gmail.com>
Signed-off-by: Lauri Nevala <lauri.nevala@gmail.com>
This commit is contained in:
Roman authored and Lauri Nevala committed 2020-08-18 11:50:54 +03:00
1 parent 5452fdb32d
commit 09c765cab0
5 files changed
+50 -25

No files matched your search

+8
View File
@@ -3,6 +3,14 @@ import { ClusterId, clusterStore } from "./cluster-store";
import { tracker } from "./tracker";
export const clusterIpc = {
// todo: remove
init: createIpcChannel({
channel: "cluster:init",
handle: async (clusterId: ClusterId) => {
return clusterStore.getById(clusterId)?.pushState();
},
}),
activate: createIpcChannel({
channel: "cluster:activate",
handle: async (clusterId: ClusterId = clusterStore.activeClusterId) => {
+1 -1
View File
@@ -129,7 +129,7 @@ export function broadcastIpc({ channel, webContentId, filter, args = [] }: IpcBr
}
views.forEach(webContent => {
const type = webContent.getType();
logger.debug(`[IPC]: sending message "${channel}" to ${type}=${webContent.id}`, { args });
logger.debug(`[IPC]: broadcasting "${channel}" to ${type}=${webContent.id}`, { args });
webContent.send(channel, ...[args].flat());
})
}