修复主窗口启动时相册集封面不显示问题

- 裁剪封面是本地文件,直接使用Uri.fromFile加载
- 文件不存在时使用MediaStore查询
This commit is contained in:
2026-04-26 21:06:41 +08:00
parent 3aab93cc4d
commit 3e49c33bc1

View File

@@ -194,7 +194,12 @@ private void loadAlbums() {
String coverPath = coverDbHelper.getCover(albumPath);
Uri coverUri = null;
if (coverPath != null) {
coverUri = getUriFromPath(coverPath);
File coverFile = new File(coverPath);
if (coverFile.exists()) {
coverUri = Uri.fromFile(coverFile);
} else {
coverUri = getUriFromPath(coverPath);
}
}
if (coverUri == null) {
ArrayList<Uri> images = getImagesInFolder(albumPath);