enshort cancellable update

This commit is contained in:
yggverse 2024-11-09 08:08:08 +02:00
parent 675e4f328c
commit f2f2ec9bd2

View File

@ -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