Clear chat connected to when session closes

This commit is contained in:
Mashintime 2023-06-09 18:10:11 -04:00
parent b6edd073b2
commit d04f3e65da
3 changed files with 14 additions and 1 deletions

View file

@ -386,6 +386,11 @@ ipcMain.on("request-show-chat-window", () => {
chat.show(); chat.show();
}); });
ipcMain.on("request-clear-chat-connected", () => {
//Clear chat window's connected with text
chat.webContents.send("action-clear-reception-status");
});
// UPDATE TNC CONNECTION // UPDATE TNC CONNECTION
ipcMain.on("request-update-tnc-ip", (event, data) => { ipcMain.on("request-update-tnc-ip", (event, data) => {
win.webContents.send("action-update-tnc-ip", data); win.webContents.send("action-update-tnc-ip", data);

View file

@ -666,7 +666,14 @@ ipcRenderer.on("action-update-reception-status", (event, arg) => {
document.getElementById("txtConnectedWithChat").textContent = data.dxcallsign; document.getElementById("txtConnectedWithChat").textContent = data.dxcallsign;
}); });
ipcRenderer.on("action-clear-reception-status", (event) => {
//Clear connected with textbox
let cwc = document.getElementById("txtConnectedWithChat");
if (cwc.textContent != "------") {
cwc.textContent = "------";
//console.log("Reseting connected with");
}
});
ipcRenderer.on("action-update-transmission-status", (event, arg) => { ipcRenderer.on("action-update-transmission-status", (event, arg) => {
var data = arg["data"][0]; var data = arg["data"][0];

View file

@ -2254,6 +2254,7 @@ ipcRenderer.on("action-update-tnc-state", (event, arg) => {
"bi bi-chat-fill text-success me-1"; "bi bi-chat-fill text-success me-1";
} else { } else {
document.getElementById("spnConnectedWith").className = "bi bi-chat-fill"; document.getElementById("spnConnectedWith").className = "bi bi-chat-fill";
ipcRenderer.send("request-clear-chat-connected");
} }
// HAMLIB STATUS // HAMLIB STATUS