mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-16 05:38:41 -09:00
app: close window when last tab is exited (#263)
This commit is contained in:
parent
fa4033937e
commit
1214d26323
1 changed files with 4 additions and 7 deletions
|
|
@ -103,13 +103,10 @@ export function userExitSession (uid) {
|
||||||
type: SESSION_USER_EXIT,
|
type: SESSION_USER_EXIT,
|
||||||
uid,
|
uid,
|
||||||
effect () {
|
effect () {
|
||||||
const { sessions } = getState().sessions;
|
rpc.emit('exit', { uid });
|
||||||
if (sessions[uid]) {
|
const sessions = keys(getState().sessions.sessions);
|
||||||
rpc.emit('exit', { uid });
|
if (!sessions.length) {
|
||||||
const sessions = keys(getState().sessions.sessions);
|
window.close();
|
||||||
if (!sessions.length) {
|
|
||||||
window.close();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue