Fix errors in the memory widget
This commit is contained in:
parent
bdc4615599
commit
0b640bf322
1 changed files with 3 additions and 3 deletions
|
@ -87,7 +87,7 @@ class MemoryWidget extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final index = _getUnseenMemoryIndex();
|
||||
final index = _getNextMemoryIndex();
|
||||
final title = _getTitle(memories[index]);
|
||||
return GestureDetector(
|
||||
onTap: () {
|
||||
|
@ -147,7 +147,7 @@ class MemoryWidget extends StatelessWidget {
|
|||
);
|
||||
}
|
||||
|
||||
int _getUnseenMemoryIndex() {
|
||||
int _getNextMemoryIndex() {
|
||||
for (var index = 0; index < memories.length; index++) {
|
||||
if (!memories[index].isSeen()) {
|
||||
return index;
|
||||
|
@ -261,7 +261,6 @@ class _FullScreenMemoryState extends State<FullScreenMemory> {
|
|||
autoPlay: true,
|
||||
);
|
||||
},
|
||||
index: _index,
|
||||
itemCount: widget.memories.length,
|
||||
pagination: SwiperPagination(
|
||||
alignment: Alignment.bottomCenter,
|
||||
|
@ -279,6 +278,7 @@ class _FullScreenMemoryState extends State<FullScreenMemory> {
|
|||
setState(() {
|
||||
_index = index;
|
||||
});
|
||||
return index;
|
||||
},
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue