修复主窗口启动时相册集封面不显示问题
- 裁剪封面是本地文件,直接使用Uri.fromFile加载 - 文件不存在时使用MediaStore查询
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user