save window size on close

This commit is contained in:
Enrique Hernandez 2021-03-18 21:16:23 -05:00
commit 5a1ab518b2
4 changed files with 33 additions and 16 deletions

View file

@ -46,11 +46,16 @@ export default defineComponent({
window.ipcRenderer.removeAllListeners('window-ready')
})
const callNavbar = (action: string) => {
const saveWindowState = async () => {
await invoke('window-save', "");
}
const callNavbar = async (action: string) => {
// save messages before closing.
if (action === 'close') {
saveMessages();
await saveWindowState();
}
invoke('nav-bar', action);