cover pick fix

This commit is contained in:
Thibault Deckers 2021-03-17 19:10:59 +09:00
parent 3d551716be
commit efdbd36055

View file

@ -27,13 +27,14 @@ class CoverSelectionDialog extends StatefulWidget {
class _CoverSelectionDialogState extends State<CoverSelectionDialog> { class _CoverSelectionDialogState extends State<CoverSelectionDialog> {
bool _isCustom; bool _isCustom;
AvesEntry _customEntry; AvesEntry _customEntry, _recentEntry;
CollectionFilter get filter => widget.filter; CollectionFilter get filter => widget.filter;
@override @override
void initState() { void initState() {
super.initState(); super.initState();
_recentEntry = context.read<CollectionSource>().recentEntry(filter);
_customEntry = widget.customEntry; _customEntry = widget.customEntry;
_isCustom = _customEntry != null; _isCustom = _customEntry != null;
} }
@ -89,7 +90,7 @@ class _CoverSelectionDialogState extends State<CoverSelectionDialog> {
child: DecoratedFilterChip( child: DecoratedFilterChip(
filter: filter, filter: filter,
extent: extent, extent: extent,
coverEntry: _isCustom ? _customEntry : null, coverEntry: _isCustom ? _customEntry : _recentEntry,
onTap: (filter) => _pickEntry(), onTap: (filter) => _pickEntry(),
), ),
), ),