Skip to content

Commit b4e4883

Browse files
Cameron AmerCameron Amer
authored andcommitted
fix: Thumbnail caching fix
1 parent 0998fca commit b4e4883

4 files changed

Lines changed: 6 additions & 6 deletions

File tree

app/package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "app",
33
"private": true,
4-
"version": "1.7.1",
4+
"version": "1.7.2",
55
"type": "module",
66
"scripts": {
77
"dev": "vite",

app/src-tauri/src/commands/preview.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ pub async fn cmd_get_thumbnail(
304304
};
305305

306306
if is_image {
307-
// Get photo thumbnail (smallest size for speed)
307+
// Get photo thumbnail (largest available for best quality)
308308
let save_path = cache_dir.join(format!("{}.{}", message_id, ext));
309309
let save_path_str = save_path.to_string_lossy().to_string();
310310

@@ -314,7 +314,7 @@ pub async fn cmd_get_thumbnail(
314314
_ => vec![],
315315
};
316316

317-
let download_success = if let Some(thumb) = thumbs.iter().filter(|t| t.size() > 0).min_by_key(|t| t.size()) {
317+
let download_success = if let Some(thumb) = thumbs.iter().filter(|t| t.size() > 0).max_by_key(|t| t.size()) {
318318
client.download_media(thumb, &save_path_str).await.is_ok()
319319
} else {
320320
client.download_media(&media, &save_path_str).await.is_ok()

app/src-tauri/tauri.conf.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
}
1313
},
1414
"productName": "Telegram Drive",
15-
"version": "1.7.1",
15+
"version": "1.7.2",
1616
"identifier": "com.cameronamer.telegramdrive",
1717
"build": {
1818
"beforeDevCommand": "npm run dev",

0 commit comments

Comments
 (0)