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,
child: _buildEmptyCollectionPlaceholder(collection),
)
: const SectionedListSliver<AvesEntry>(),
: SectionedListSliver<AvesEntry>(),
BottomPaddingSliver(),
],
);

View file

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

View file

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