Fix icon overwrite (#128)

* run sync twive to fix up images

* Update dependencies versions

* update cargo-lock dependencies

* Adding spinners to ui

* Fix icons for gog games

* Run fix shortcuts for all boilr shortcuts

* Update flatpak release notes
This commit is contained in:
Philip Kristoffersen
2022-05-15 07:51:21 +02:00
committed by GitHub
parent 4135d62416
commit eb819c1357
10 changed files with 915 additions and 1805 deletions
+15 -6
View File
@@ -5,9 +5,9 @@ use std::{
use crate::{
config::get_thumbnails_folder,
steam::{get_installed_games, SteamGameInfo},
steam::{get_shortcuts_paths, SteamUsersInfo},
steamgriddb::{get_image_extension, get_query_type, CachedSearch, ImageType, ToDownload},
steam::{get_installed_games, SteamGameInfo},
};
use dashmap::DashMap;
use egui::{ImageButton, ScrollArea};
@@ -262,7 +262,10 @@ impl MyEguiApp {
TextureState::Downloading => {
ui.ctx().request_repaint();
//nothing to do,just wait
ui.label(format!("Downloading id {}", image.id));
ui.horizontal(|ui| {
ui.spinner();
ui.label(format!("Downloading id {}", image.id));
});
}
TextureState::Downloaded => {
//Need to load
@@ -272,7 +275,10 @@ impl MyEguiApp {
*state.value_mut() = TextureState::Loaded(handle);
}
ui.ctx().request_repaint();
ui.label("Loading");
ui.horizontal(|ui| {
ui.spinner();
ui.label("Loading");
});
}
TextureState::Loaded(texture_handle) => {
//need to show
@@ -317,7 +323,10 @@ impl MyEguiApp {
}
}
_ => {
ui.label("Finding possible images");
ui.horizontal(|ui| {
ui.spinner();
ui.label("Finding possible images");
});
ui.ctx().request_repaint();
}
}
@@ -732,8 +741,8 @@ impl HasImageKey for GameType {
impl HasImageKey for SteamGameInfo {
fn key(&self, image_type: &ImageType, user_path: &Path) -> (PathBuf, String) {
let mut keys = POSSIBLE_EXTENSIONS
.iter()
.map(|ext| key_from_extension(self.appid, image_type, user_path, ext));
.iter()
.map(|ext| key_from_extension(self.appid, image_type, user_path, ext));
let first = keys.next().unwrap();
let other = keys.filter(|(exsists, _, _)| *exsists).next();
let (_, path, key) = other.unwrap_or(first);