Skip to content

Commit

Permalink
app: instantiate stashLoader before passing to StashesView
Browse files Browse the repository at this point in the history
  • Loading branch information
shonya3 committed Sep 1, 2023
1 parent d76f33b commit 3c0aaf3
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion packages/app/src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ divi = {path = "../../../divi"}
ntapi = "0.4.1"
serde_json = "1.0"
serde = { version = "1.0", features = ["derive"] }
tauri = { version = "1.3", features = ["api-all", "updater"] }
tauri = { version = "1.3", features = ["api-all", "updater", "devtools"] }

# tauri-api = "0.7.6"
strsim = "0.10.0"
Expand Down
6 changes: 3 additions & 3 deletions packages/app/src-tauri/lib/src/poe/stash.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ impl StashAPI {

let headers = &response.headers();

for header in headers.iter() {
println!("{header:?}");
}
// for header in headers.iter() {
// println!("{header:?}");
// }

if let Some(s) = headers.get("retry-after") {
let s = s.to_str().unwrap().to_owned();
Expand Down
2 changes: 1 addition & 1 deletion packages/app/src-tauri/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ async fn main() {
let app_version = AppVersion(app.config().package.version.clone().unwrap());
app.manage(app_prices);
app.manage(app_version);
#[cfg(debug_assertions)] // only include this code on debug builds
// #[cfg(debug_assertions)] // only include this code on debug builds
{
let window = app.get_window("main").unwrap();
window.open_devtools();
Expand Down
3 changes: 2 additions & 1 deletion packages/app/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import { PoeAuthElement } from '@divicards/wc/src/wc/poe-auth';
import { StashLoader } from './StashLoader';
DropFilesMessageElement.define();
PoeAuthElement.define();
const stashLoader = new StashLoader();
const sampleStore = useSampleStore();
const authStore = useAuthStore();
Expand Down Expand Up @@ -49,7 +50,7 @@ const openStashWindow = async () => {

<div v-show="authStore.loggedIn && stashVisible">
<StashesView
:stashLoader="new StashLoader()"
:stashLoader="stashLoader"
@sample-from-tab="sampleStore.addSample"
@close="stashVisible = false"
/>
Expand Down
2 changes: 0 additions & 2 deletions packages/wc/src/wc/stashes/stashes-view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,6 @@ export class StashesViewElement extends BaseElement {
await new Promise(r => setTimeout(r, SLEEP_SECS * 1000));
}

console.log('here');

this.fetchingStash = false;
this.msg = '';
}
Expand Down

0 comments on commit 3c0aaf3

Please sign in to comment.