Skip to content

Commit

Permalink
fix: Build
Browse files Browse the repository at this point in the history
Signed-off-by: Lachezar Lechev <[email protected]>
  • Loading branch information
elpiel committed Jan 9, 2024
1 parent 2f8f7b4 commit 06fad09
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ impl Application {

// NOTE: we do not need to run the Fruitbasket event loop but we do need to keep `app` in-scope for the full lifecycle of the app
#[cfg(target_os = "macos")]
let _fruit_app = register_apple_event_callbacks();
let _fruit_app = register_apple_event_callbacks(self.server.server_url_receiver());

// Showing the system tray icon as soon as possible to give the user a feedback
let event_loop: EventLoop<MenuEvent> = EventLoop::with_user_event();
Expand Down Expand Up @@ -597,7 +597,9 @@ fn make_it_autostart(home_dir: impl AsRef<Path>) {
}

#[cfg(target_os = "macos")]
fn register_apple_event_callbacks() -> fruitbasket::FruitApp<'static> {
fn register_apple_event_callbacks(
server_url_receiver: watch::Receiver<Option<Url>>,
) -> fruitbasket::FruitApp<'static> {
use fruitbasket::{FruitApp, FruitCallbackKey};

let mut app = FruitApp::new();
Expand Down Expand Up @@ -625,10 +627,10 @@ fn register_apple_event_callbacks() -> fruitbasket::FruitApp<'static> {
}
});
error!("Error parsing addon url for schema event! {err}");
warn!("Open stremio web instead...");
log::warn!("Open stremio web instead...");
StremioWeb::OpenWeb {
server_url,
web_url: futures::executor::block_on(Self::detect_web_url()),
web_url: futures::executor::block_on(Application::detect_web_url()),
}
.open()
}
Expand Down

0 comments on commit 06fad09

Please sign in to comment.