|
@@ -70,6 +70,8 @@ class _PhotoMainPageState extends State<PhotoMainPage>
|
70
|
70
|
|
71
|
71
|
bool isPushed = false;
|
72
|
72
|
|
|
73
|
+ bool get useAlbum => widget.photoList == null || widget.photoList.isEmpty;
|
|
74
|
+
|
73
|
75
|
@override
|
74
|
76
|
void initState() {
|
75
|
77
|
super.initState();
|
|
@@ -172,7 +174,7 @@ class _PhotoMainPageState extends State<PhotoMainPage>
|
172
|
174
|
}
|
173
|
175
|
|
174
|
176
|
void _refreshList() {
|
175
|
|
- if (widget.photoList != null && widget.photoList.isNotEmpty) {
|
|
177
|
+ if (!useAlbum) {
|
176
|
178
|
_refreshListFromWidget();
|
177
|
179
|
return;
|
178
|
180
|
}
|
|
@@ -456,5 +458,10 @@ class _PhotoMainPageState extends State<PhotoMainPage>
|
456
|
458
|
);
|
457
|
459
|
}
|
458
|
460
|
|
459
|
|
- void _onAssetChange() {}
|
|
461
|
+ void _onAssetChange() {
|
|
462
|
+ if (useAlbum) {
|
|
463
|
+ _refreshList();
|
|
464
|
+ }
|
|
465
|
+ }
|
|
466
|
+
|
460
|
467
|
}
|