Refactor desktop into App type

This commit is contained in:
Jonathan Kelley committed 2024-01-04 16:12:37 -08:00
1 parent f6acaba061
commit 9a6d745339
15 files changed
+728 -645

No files matched your search

+4 -6
View File
@@ -1,4 +1,4 @@
use crate::{window, DesktopContext};
use crate::{use_window, DesktopContext};
use dioxus_core::ScopeState;
use dioxus_interpreter_js::INTERPRETER_JS;
use slab::Slab;
@@ -17,7 +17,7 @@ use tokio::{
};
use wry::{
http::{status::StatusCode, Request, Response},
Result,
RequestAsyncResponder, Result,
};
use crate::desktop_context::EditQueue;
@@ -259,8 +259,7 @@ pub(super) async fn desktop_handler(
.body(Cow::from(body))
{
Ok(response) => {
responder.respond(response);
return;
return Ok(response);
}
Err(err) => tracing::error!("error building response: {}", err),
}
@@ -307,8 +306,7 @@ pub(super) async fn desktop_handler(
.body(Cow::from(asset))
{
Ok(response) => {
responder.respond(response);
return;
return response;
}
Err(err) => tracing::error!("error building response: {}", err),
}