fixed collection refresh

This commit is contained in:
Thibault Deckers 2021-06-08 12:23:56 +09:00
parent 62f0453665
commit fa5f30ea7c
3 changed files with 2 additions and 4 deletions

View file

@ -327,7 +327,7 @@ class _CollectionScrollViewState extends State<_CollectionScrollView> {
hasScrollBody: false, hasScrollBody: false,
child: _buildEmptyCollectionPlaceholder(collection), child: _buildEmptyCollectionPlaceholder(collection),
) )
: const SectionedListSliver<AvesEntry>(), : SectionedListSliver<AvesEntry>(),
BottomPaddingSliver(), BottomPaddingSliver(),
], ],
); );

View file

@ -76,7 +76,7 @@ class InteractiveThumbnail extends StatelessWidget {
id: collection.id, id: collection.id,
listenToSource: false, listenToSource: false,
); );
assert(viewerCollection.entryCount == collection.entryCount); assert(viewerCollection.sortedEntries.contains(entry));
return EntryViewerPage( return EntryViewerPage(
collection: viewerCollection, collection: viewerCollection,
initialEntry: entry, initialEntry: entry,

View file

@ -14,8 +14,6 @@ import 'package:provider/provider.dart';
// cf https://github.com/flutter/flutter/issues/49027 // cf https://github.com/flutter/flutter/issues/49027
// adapted from `RenderSliverFixedExtentBoxAdaptor` // adapted from `RenderSliverFixedExtentBoxAdaptor`
class SectionedListSliver<T> extends StatelessWidget { class SectionedListSliver<T> extends StatelessWidget {
const SectionedListSliver();
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final sectionLayouts = context.watch<SectionedListLayout<T>>().sectionLayouts; final sectionLayouts = context.watch<SectionedListLayout<T>>().sectionLayouts;