summaryrefslogtreecommitdiffstats
path: root/examples/url_handler/src
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2023-09-10 00:34:21 +0200
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2023-09-10 00:34:21 +0200
commitb8e5693a3089d728b4f8d4b3b0b7197202ebd732 (patch)
tree79a9f84f9920525657fbe03d53ce33bab09053d7 /examples/url_handler/src
parent956512338905bac0b156fdaf16fe3c3e07e97a84 (diff)
parenta3489e4af960388e9f73988b88df361022a654a4 (diff)
downloadiced-b8e5693a3089d728b4f8d4b3b0b7197202ebd732.tar.gz
iced-b8e5693a3089d728b4f8d4b3b0b7197202ebd732.tar.bz2
iced-b8e5693a3089d728b4f8d4b3b0b7197202ebd732.zip
Merge branch 'master' into explicit-text-caching
Diffstat (limited to 'examples/url_handler/src')
-rw-r--r--examples/url_handler/src/main.rs13
1 files changed, 7 insertions, 6 deletions
diff --git a/examples/url_handler/src/main.rs b/examples/url_handler/src/main.rs
index f63fa06a..bf570123 100644
--- a/examples/url_handler/src/main.rs
+++ b/examples/url_handler/src/main.rs
@@ -1,6 +1,5 @@
-use iced::event::{Event, MacOS, PlatformSpecific};
+use iced::event::{self, Event};
use iced::executor;
-use iced::subscription;
use iced::widget::{container, text};
use iced::{
Application, Command, Element, Length, Settings, Subscription, Theme,
@@ -37,9 +36,11 @@ impl Application for App {
fn update(&mut self, message: Message) -> Command<Message> {
match message {
Message::EventOccurred(event) => {
- if let Event::PlatformSpecific(PlatformSpecific::MacOS(
- MacOS::ReceivedUrl(url),
- )) = event
+ if let Event::PlatformSpecific(
+ event::PlatformSpecific::MacOS(event::MacOS::ReceivedUrl(
+ url,
+ )),
+ ) = event
{
self.url = Some(url);
}
@@ -50,7 +51,7 @@ impl Application for App {
}
fn subscription(&self) -> Subscription<Message> {
- subscription::events().map(Message::EventOccurred)
+ event::listen().map(Message::EventOccurred)
}
fn view(&self) -> Element<Message> {