Fix performance, add screenshots, make banner scrollable
- Make detail view banner scroll with content instead of staying fixed, preventing tall banners from eating screen space - Optimize squashfs offset scanning with buffered 256KB chunk reading instead of loading entire file into memory (critical for 1.5GB+ files) - Add screenshot URL parsing from AppStream XML and async image display with carousel in the overview tab - Fix infinite re-analysis bug: has_appstream check caused every app without AppStream data to be re-analyzed on every startup. Now handled via one-time migration reset in v10 - Database migration v10: add screenshot_urls column, reset analysis status for one-time re-scan with new parser
This commit is contained in:
@@ -117,6 +117,11 @@ pub fn run_background_analysis(id: i64, path: PathBuf, appimage_type: AppImageTy
|
||||
} else {
|
||||
Some(serde_json::to_string(&meta.desktop_actions).unwrap_or_default())
|
||||
};
|
||||
let screenshot_urls_str = if meta.screenshot_urls.is_empty() {
|
||||
None
|
||||
} else {
|
||||
Some(meta.screenshot_urls.join("\n"))
|
||||
};
|
||||
|
||||
if let Err(e) = db.update_appstream_metadata(
|
||||
id,
|
||||
@@ -136,6 +141,7 @@ pub fn run_background_analysis(id: i64, path: PathBuf, appimage_type: AppImageTy
|
||||
release_json.as_deref(),
|
||||
actions_json.as_deref(),
|
||||
meta.has_signature,
|
||||
screenshot_urls_str.as_deref(),
|
||||
) {
|
||||
log::warn!("Failed to update appstream metadata for id {}: {}", id, e);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user