Skip to content

Commit

Permalink
Open archive by default on WebAssembly
Browse files Browse the repository at this point in the history
  • Loading branch information
KoffeinFlummi committed Feb 19, 2024
1 parent c7e1493 commit 68a9d60
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 0 additions & 2 deletions src/gui/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,6 @@ impl MapState {

// repopulate cache
if self.cached_state.map(|s| s != state).unwrap_or(true) {
//let last_position = (

let all_positions = data_source.vehicle_states()
.scan((None, None), |(ground_asl, altitude_asl), (_, vs)| {
*ground_asl = vs.altitude_ground_asl.or(*ground_asl);
Expand Down
11 changes: 10 additions & 1 deletion src/gui/windows/archive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,22 @@ enum ArchiveLoadProgress { Progress((u64, u64)),
Error(reqwest::Error),
}

#[derive(Default)]
pub struct ArchiveWindow {
pub open: bool,
progress_receiver: Option<Receiver<ArchiveLoadProgress>>,
progress: Option<(u64, u64)>,
}

impl Default for ArchiveWindow {
fn default() -> Self {
Self {
open: cfg!(target_arch = "wasm32"),
progress_receiver: None,
progress: None
}
}
}

impl ArchiveWindow {
async fn load_log(ctx: egui::Context, url: &str, progress_sender: Sender<ArchiveLoadProgress>) {
let start = Instant::now();
Expand Down

0 comments on commit 68a9d60

Please sign in to comment.