save window size on close
This commit is contained in:
parent
db3c22b632
commit
5a1ab518b2
4 changed files with 33 additions and 16 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue