parent
29b20972c5
commit
df849ba960
3
gui/Cargo.lock
generated
3
gui/Cargo.lock
generated
@ -1750,8 +1750,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "iced_futures"
|
||||
version = "0.6.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "215d51fa4f70dbb63775d7141243c4d98d4d525d8949695601f8fbac7dcbc04e"
|
||||
source = "git+https://github.com/edouardparis/iced?branch=fix-futures-recipe#2d8318b13bdf8aaf31bc6d5a72b22313ed2d10cf"
|
||||
dependencies = [
|
||||
"futures",
|
||||
"log",
|
||||
|
||||
@ -47,6 +47,9 @@ bitcoin_hashes = "0.12"
|
||||
reqwest = { version = "0.11", default-features=false, features = ["rustls-tls"] }
|
||||
rust-ini = "0.19.0"
|
||||
|
||||
[patch.crates-io]
|
||||
iced_futures = { git = "https://github.com/edouardparis/iced", branch = "fix-futures-recipe"}
|
||||
|
||||
[target.'cfg(windows)'.dependencies]
|
||||
zip = { version = "0.6", default-features=false, features = ["bzip2", "deflate"] }
|
||||
|
||||
|
||||
@ -259,18 +259,14 @@ impl Application for GUI {
|
||||
State::App(v) => v.subscription().map(|msg| Message::Run(Box::new(msg))),
|
||||
State::Launcher(v) => v.subscription().map(|msg| Message::Launch(Box::new(msg))),
|
||||
},
|
||||
iced_native::subscription::events_with(|event, _status| {
|
||||
if matches!(
|
||||
event,
|
||||
iced::Event::Window(iced_native::window::Event::CloseRequested)
|
||||
) {
|
||||
Some(event)
|
||||
} else {
|
||||
None
|
||||
}
|
||||
})
|
||||
.map(Self::Message::Event),
|
||||
iced_native::subscription::events().map(Self::Message::Event),
|
||||
])
|
||||
.with_filter(|(event, _status)| {
|
||||
matches!(
|
||||
event,
|
||||
iced::Event::Window(iced_native::window::Event::CloseRequested)
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
fn view(&self) -> Element<Self::Message> {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user