Fix animation issue
This commit is contained in:
parent
8f980a2192
commit
2f41ae72db
|
@ -254,6 +254,12 @@ class CollectionsService {
|
|||
return null;
|
||||
}
|
||||
|
||||
File? getCoverCache(Collection c) {
|
||||
final int localSyncTime = getCollectionSyncTime(c.id);
|
||||
final String coverKey = '${c.id}_${localSyncTime}_${c.updationTime}';
|
||||
return _coverCache[coverKey];
|
||||
}
|
||||
|
||||
Future<int> getFileCount(Collection c) async {
|
||||
if (_countCache.containsKey(c.id)) {
|
||||
return _countCache[c.id]!;
|
||||
|
|
|
@ -59,8 +59,13 @@ class AlbumRowItemWidget extends StatelessWidget {
|
|||
FutureBuilder<File?>(
|
||||
future: CollectionsService.instance.getCover(c),
|
||||
builder: (context, snapshot) {
|
||||
File? thumbnail;
|
||||
if (snapshot.hasData) {
|
||||
final thumbnail = snapshot.data!;
|
||||
thumbnail = snapshot.data!;
|
||||
} else {
|
||||
thumbnail = CollectionsService.instance.getCoverCache(c);
|
||||
}
|
||||
if (thumbnail != null) {
|
||||
final String heroTag = tagPrefix + thumbnail.tag;
|
||||
return Hero(
|
||||
tag: heroTag,
|
||||
|
|
Loading…
Reference in a new issue