Make window::close return and introduce Task::discard
This commit is contained in:
parent
7740c35a2a
commit
01aa84e41a
5 changed files with 24 additions and 7 deletions
|
|
@ -20,7 +20,9 @@ enum Message {
|
|||
impl Exit {
|
||||
fn update(&mut self, message: Message) -> Task<Message> {
|
||||
match message {
|
||||
Message::Confirm => window::get_latest().and_then(window::close),
|
||||
Message::Confirm => {
|
||||
window::get_latest().and_then(window::close).discard()
|
||||
}
|
||||
Message::Exit => {
|
||||
self.show_confirm = true;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue