make desktop compile

This commit is contained in:
Evan Almloff committed 2024-01-05 14:39:45 -06:00
1 parent 21b71e992f
commit 3865f44081
27 files changed
+357 -422

No files matched your search

+3 -3
View File
@@ -1,5 +1,5 @@
#![allow(missing_docs)]
use dioxus_core::{ScopeState, TaskId};
use dioxus_core::{ScopeState, Task};
use std::{any::Any, cell::Cell, future::Future, rc::Rc, sync::Arc};
use crate::{use_state, UseState};
@@ -74,7 +74,7 @@ pub enum FutureState<'a, T> {
pub struct UseFuture<T: 'static> {
update: Arc<dyn Fn()>,
needs_regen: Rc<Cell<bool>>,
task: Rc<Cell<Option<TaskId>>>,
task: Rc<Cell<Option<Task>>>,
state: UseState<Option<T>>,
}
@@ -114,7 +114,7 @@ impl<T> UseFuture<T> {
}
/// Get the ID of the future in Dioxus' internal scheduler
pub fn task(&self) -> Option<TaskId> {
pub fn task(&self) -> Option<Task> {
self.task.get()
}