Fix display and sync bugs
This commit is contained in:
1 parent
5b2b48c88f
commit
0b23da9eda
4 files changed
+46
-17
No files matched your search
+6
-2
@@ -5,7 +5,7 @@ use crate::data_provider::web_api::*;
|
||||
use crate::jl_button;
|
||||
use crate::navigation::Page::PreviousPage;
|
||||
use crate::navigation::{NavigatedPage, Page, RootMessage};
|
||||
use crate::notification::{NotificationData, NotificationRequest};
|
||||
use crate::notification::{MaybeError, NotificationData, NotificationRequest};
|
||||
use crate::pages::sync::SyncMessage::*;
|
||||
use crate::styling::*;
|
||||
use crate::{push_error, push_error_task};
|
||||
@@ -115,12 +115,16 @@ impl NavigatedPage<SyncMessage> for SyncState {
|
||||
|
||||
self.real_load = false;
|
||||
let id = self.state.sync_data.read().key.clone().unwrap();
|
||||
self.state.connection.lock().finish();
|
||||
let tasks = Task::batch([
|
||||
Task::perform(
|
||||
async { tokio::time::sleep(Duration::from_millis(200)).await },
|
||||
|_| RootMessage::Sync(NextAnimation),
|
||||
),
|
||||
Task::perform(load_data(id, false), |_| RootMessage::Sync(NetworkFinished)),
|
||||
Task::perform(load_data(id, false), |load_result| match load_result {
|
||||
Ok(_) => RootMessage::Sync(NetworkFinished),
|
||||
Err(error) => push_error!(error)
|
||||
}),
|
||||
]);
|
||||
|
||||
return tasks;
|
||||
|
||||
Reference in new issue
Block a user