Skip to content

Commit

Permalink
feat: only take filename so it's wasm friendly
Browse files Browse the repository at this point in the history
  • Loading branch information
c-git committed Jun 2, 2024
1 parent 096ac1c commit 4260df8
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -294,12 +294,10 @@ impl LogViewerApp {
return Box::new(LoadingStatus::NotInProgress);
};
#[cfg(not(target_arch = "wasm32"))]
{
if let Some(parent) = file.path().parent() {
*start_open_path.lock().unwrap() = Some(PathBuf::from(parent));
}
*last_filename.lock().unwrap() = Some(PathBuf::from(file.path()));
if let Some(parent) = file.path().parent() {
*start_open_path.lock().unwrap() = Some(PathBuf::from(parent));
}
*last_filename.lock().unwrap() = Some(PathBuf::from(file.file_name()));
let text = file.read().await;

// Uncomment the following line to simulate taking long to load, only works on native
Expand Down

0 comments on commit 4260df8

Please sign in to comment.