mirror of
https://github.com/lifegpc/eh_downloader_flutter.git
synced 2026-06-28 06:36:46 +08:00
Fix #3
This commit is contained in:
@@ -365,5 +365,6 @@
|
||||
"message": "Message",
|
||||
"type": "Type",
|
||||
"level": "Level",
|
||||
"galleryListDisplayMode": "Display mode for gallery list"
|
||||
"galleryListDisplayMode": "Display mode for gallery list",
|
||||
"noGalleriesFound": "No galleries found."
|
||||
}
|
||||
|
||||
@@ -365,5 +365,6 @@
|
||||
"message": "消息",
|
||||
"type": "类型",
|
||||
"level": "级别",
|
||||
"galleryListDisplayMode": "画廊列表的显示模式"
|
||||
"galleryListDisplayMode": "画廊列表的显示模式",
|
||||
"noGalleriesFound": "找不到画廊"
|
||||
}
|
||||
|
||||
@@ -72,22 +72,24 @@ class _GalleriesPage extends State<GalleriesPage>
|
||||
category: widget.category,
|
||||
tag: widget.tag))
|
||||
.unwrap();
|
||||
final thumbnails =
|
||||
(await api.getGalleriesThumbnail(list.map((e) => e.gid).toList()))
|
||||
.unwrap();
|
||||
_thumbnails.merge(thumbnails);
|
||||
final files = (await api.getFiles(list
|
||||
.map((e) {
|
||||
var thumbnail = _thumbnails.thumbnails[e.gid];
|
||||
if (thumbnail != null && thumbnail.ok) {
|
||||
return thumbnail.unwrap().token;
|
||||
}
|
||||
})
|
||||
.where((t) => t != null)
|
||||
.cast<String>()
|
||||
.toList()))
|
||||
.unwrap();
|
||||
_files.merge(files);
|
||||
if (list.isNotEmpty) {
|
||||
final thumbnails =
|
||||
(await api.getGalleriesThumbnail(list.map((e) => e.gid).toList()))
|
||||
.unwrap();
|
||||
_thumbnails.merge(thumbnails);
|
||||
final files = (await api.getFiles(list
|
||||
.map((e) {
|
||||
var thumbnail = _thumbnails.thumbnails[e.gid];
|
||||
if (thumbnail != null && thumbnail.ok) {
|
||||
return thumbnail.unwrap().token;
|
||||
}
|
||||
})
|
||||
.where((t) => t != null)
|
||||
.cast<String>()
|
||||
.toList()))
|
||||
.unwrap();
|
||||
_files.merge(files);
|
||||
}
|
||||
final isLastPage = list.length < _pageSize;
|
||||
if (isLastPage) {
|
||||
_pagingController.appendLastPage(list);
|
||||
@@ -268,6 +270,10 @@ class _GalleriesPage extends State<GalleriesPage>
|
||||
extra: GalleryPageExtra(title: item.preferredTitle));
|
||||
},
|
||||
);
|
||||
}, noItemsFoundIndicatorBuilder: (context) {
|
||||
return Center(
|
||||
child: Text(i18n.noGalleriesFound,
|
||||
style: Theme.of(context).textTheme.titleLarge));
|
||||
}),
|
||||
)));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user