minor fix
This commit is contained in:
parent
437572550a
commit
085f4b2eca
2 changed files with 2 additions and 2 deletions
|
@ -302,7 +302,7 @@ class _ContentState extends State<_Content> with SingleTickerProviderStateMixin
|
||||||
if (regionCollection != null) {
|
if (regionCollection != null) {
|
||||||
final regionEntries = regionCollection!.sortedEntries;
|
final regionEntries = regionCollection!.sortedEntries;
|
||||||
final selectedIndex = _selectedIndexNotifier.value;
|
final selectedIndex = _selectedIndexNotifier.value;
|
||||||
selectedEntry = selectedIndex != null && selectedIndex < regionEntries.length ? regionEntries[selectedIndex] : null;
|
selectedEntry = selectedIndex != null && 0 <= selectedIndex && selectedIndex < regionEntries.length ? regionEntries[selectedIndex] : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
_regionCollectionNotifier.value = openingCollection.copyWith(
|
_regionCollectionNotifier.value = openingCollection.copyWith(
|
||||||
|
|
|
@ -56,7 +56,7 @@ class _ViewerThumbnailPreviewState extends State<ViewerThumbnailPreview> {
|
||||||
return ThumbnailScroller(
|
return ThumbnailScroller(
|
||||||
availableWidth: widget.availableWidth,
|
availableWidth: widget.availableWidth,
|
||||||
entryCount: entryCount,
|
entryCount: entryCount,
|
||||||
entryBuilder: (index) => index < entryCount ? entries[index] : null,
|
entryBuilder: (index) => 0 <= index && index < entryCount ? entries[index] : null,
|
||||||
indexNotifier: _entryIndexNotifier,
|
indexNotifier: _entryIndexNotifier,
|
||||||
onTap: (index) => ViewEntryNotification(index: index).dispatch(context),
|
onTap: (index) => ViewEntryNotification(index: index).dispatch(context),
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue