mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-11-10 06:34:20 +00:00
Tiny aesthetic tweaks
This commit is contained in:
parent
a0f1b1fc3e
commit
127709f83f
3 changed files with 4 additions and 17 deletions
|
@ -269,8 +269,8 @@ impl ScopeContext {
|
|||
.get(cur_hook)
|
||||
.and_then(|inn| {
|
||||
self.hook_index.set(cur_hook + 1);
|
||||
let raw_ref: & dyn Any = inn.as_ref();
|
||||
raw_ref.downcast_ref ::<State>().cloned()
|
||||
let raw_ref: &dyn Any = inn.as_ref();
|
||||
raw_ref.downcast_ref::<State>().cloned()
|
||||
})
|
||||
.expect(
|
||||
r#"
|
||||
|
|
|
@ -50,7 +50,7 @@ pub(crate) struct App {
|
|||
/// A bundle of state shared between all the windows, providing a way for us to communicate with running webview.
|
||||
///
|
||||
/// Todo: everything in this struct is wrapped in Rc<>, but we really only need the one top-level refcell
|
||||
pub struct SharedContext {
|
||||
pub(crate) struct SharedContext {
|
||||
pub(crate) event_handlers: WindowEventHandlers,
|
||||
pub(crate) pending_webviews: RefCell<Vec<WebviewInstance>>,
|
||||
pub(crate) shortcut_manager: ShortcutRegistry,
|
||||
|
|
|
@ -1,6 +1,4 @@
|
|||
use std::{cell::RefCell, rc::Rc, sync::Arc, sync::Mutex};
|
||||
|
||||
use std::fmt::{Debug, Formatter};
|
||||
use std::{cell::RefCell, rc::Rc};
|
||||
|
||||
/// This handles communication between the requests that the webview makes and the interpreter. The interpreter constantly makes long running requests to the webview to get any edits that should be made to the DOM almost like server side events.
|
||||
/// It will hold onto the requests until the interpreter is ready to handle them and hold onto any pending edits until a new request is made.
|
||||
|
@ -10,17 +8,6 @@ pub(crate) struct EditQueue {
|
|||
responder: Rc<RefCell<Option<wry::RequestAsyncResponder>>>,
|
||||
}
|
||||
|
||||
impl Debug for EditQueue {
|
||||
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
|
||||
f.debug_struct("EditQueue")
|
||||
.field("queue", &self.queue)
|
||||
.field("responder", {
|
||||
&self.responder.borrow().as_ref().map(|_| ())
|
||||
})
|
||||
.finish()
|
||||
}
|
||||
}
|
||||
|
||||
impl EditQueue {
|
||||
pub fn handle_request(&self, responder: wry::RequestAsyncResponder) {
|
||||
let mut queue = self.queue.borrow_mut();
|
||||
|
|
Loading…
Reference in a new issue