window: Only clean login if a new session is ready
This commit is contained in:
parent
340fff5276
commit
26c182b052
2 changed files with 4 additions and 3 deletions
|
@ -571,6 +571,10 @@ impl Login {
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
session.connect_ready(clone!(@weak self as obj => move |_| {
|
||||||
|
obj.clean();
|
||||||
|
}));
|
||||||
};
|
};
|
||||||
|
|
||||||
session.prepare(client, session_info).await;
|
session.prepare(client, session_info).await;
|
||||||
|
|
|
@ -182,9 +182,6 @@ impl Window {
|
||||||
// We need to grab the focus so that keyboard shortcuts work
|
// We need to grab the focus so that keyboard shortcuts work
|
||||||
session.grab_focus();
|
session.grab_focus();
|
||||||
|
|
||||||
session.connect_ready(clone!(@weak self as obj => move |_| {
|
|
||||||
obj.imp().login.clean();
|
|
||||||
}));
|
|
||||||
session.connect_logged_out(clone!(@weak self as obj => move |session| {
|
session.connect_logged_out(clone!(@weak self as obj => move |session| {
|
||||||
obj.remove_session(session)
|
obj.remove_session(session)
|
||||||
}));
|
}));
|
||||||
|
|
Loading…
Reference in a new issue