mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-01 09:05:27 +00:00
enshort cancellable update
This commit is contained in:
parent
675e4f328c
commit
f2f2ec9bd2
1 changed files with 5 additions and 8 deletions
|
|
@ -186,16 +186,13 @@ impl Page {
|
||||||
// Reset widgets
|
// Reset widgets
|
||||||
self.input.unset();
|
self.input.unset();
|
||||||
|
|
||||||
// Cancel previous async loading operations
|
// Cancel previous async operations
|
||||||
{
|
let cancellable = self.cancellable.take();
|
||||||
let cancellable = self.cancellable.borrow();
|
if !cancellable.is_cancelled() {
|
||||||
|
cancellable.cancel();
|
||||||
if !cancellable.is_cancelled() {
|
|
||||||
cancellable.cancel();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create new cancellable pointer
|
// Create new cancellable
|
||||||
self.cancellable.replace(Cancellable::new());
|
self.cancellable.replace(Cancellable::new());
|
||||||
|
|
||||||
// Create shared variant value
|
// Create shared variant value
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue