some initial design changes
This commit is contained in:
parent
5d74c67648
commit
664a9d06f9
5 changed files with 10 additions and 14 deletions
|
|
@ -22,7 +22,7 @@ app.on("ready", () =>
|
|||
initAccount();
|
||||
});
|
||||
|
||||
app.on("will-quit", terminateAudio);
|
||||
// app.on("will-quit", terminateAudio);
|
||||
|
||||
// When user clicks app icon (re-open)
|
||||
app.on("activate", createWin);
|
||||
|
|
|
|||
|
|
@ -38,6 +38,3 @@ window.mainApi.on("set-account", (account_) => {
|
|||
|
||||
export default App;
|
||||
export { account };
|
||||
|
||||
// Is called when window is about to close or reload
|
||||
window.onbeforeunload = () => console.log("beforeUnload");
|
||||
|
|
@ -28,22 +28,18 @@ const Messenger = {
|
|||
{
|
||||
person.value = update;
|
||||
}
|
||||
else if (typeof update == Array)
|
||||
{
|
||||
messages.value.push(...update);
|
||||
}
|
||||
else if (message.content)
|
||||
{
|
||||
messages.value.push(update);
|
||||
}
|
||||
else if (update.new)
|
||||
else
|
||||
{
|
||||
messages.value.at(-1)[update.new] = update.val;
|
||||
messages.value.at(-1).content.push(update);
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
window.mainApi.send("message", "win");
|
||||
window.mainApi.send("message", {route: "window", open: true});
|
||||
});
|
||||
|
||||
return { person, messages, onDrop };
|
||||
|
|
@ -71,3 +67,6 @@ const Messenger = {
|
|||
}
|
||||
|
||||
export default Messenger;
|
||||
|
||||
// Is called when window is about to close or reload
|
||||
window.onbeforeunload = () => window.mainApi.send("message", {route: "window", open: true});
|
||||
|
|
|
|||
|
|
@ -35,14 +35,14 @@ function handleUpdateQueue()
|
|||
function launchSession(account)
|
||||
{
|
||||
connectToPlatform(account);
|
||||
initAudio();
|
||||
processContentId = setInterval(handleMessageQueue, 100);
|
||||
// initAudio();
|
||||
processContentId = setInterval(handleUpdateQueue, 100);
|
||||
}
|
||||
|
||||
function endSession()
|
||||
{
|
||||
clearInterval(processContentId);
|
||||
terminateAudio();
|
||||
// terminateAudio();
|
||||
disconnectFromPlatform();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue