Added icon caching

This commit is contained in:
nik012003
2023-02-22 01:20:37 +01:00
parent b9b2c1a007
commit ede183fdce
6 changed files with 155 additions and 39 deletions

View File

@@ -64,7 +64,7 @@ impl ProtoStar {
RawIconType::Gltf(_) => true,
})
.or(last_icon)
.map(|i| dbg!(i.process(64)).ok())
.map(|i| i.process(128).ok())
.ok_or_else(|| eyre!("No compatible icons found"))?;
Self::new_raw(
parent,
@@ -144,6 +144,7 @@ impl RootHandler for ProtoStar {
self.icon_shrink = Some(Tweener::quart_in_out(1.0, 0.0, 0.25));
let future = startup_settings.generate_startup_token().unwrap();
let executable = dbg!(self.execute_command.clone());
//TODO: split the executable string for the args
tokio::task::spawn(async move {
std::env::set_var("STARDUST_STARTUP_TOKEN", future.await.unwrap());
if unsafe { fork() }.unwrap().is_parent() {