|
@@ -410,9 +410,11 @@ class _FullScreenMemoryState extends State<FullScreenMemory> {
|
|
extents: 1,
|
|
extents: 1,
|
|
onPageChanged: (index) async {
|
|
onPageChanged: (index) async {
|
|
await MemoriesService.instance.markMemoryAsSeen(widget.memories[index]);
|
|
await MemoriesService.instance.markMemoryAsSeen(widget.memories[index]);
|
|
- setState(() {
|
|
|
|
- _index = index;
|
|
|
|
- });
|
|
|
|
|
|
+ if (mounted) {
|
|
|
|
+ setState(() {
|
|
|
|
+ _index = index;
|
|
|
|
+ });
|
|
|
|
+ }
|
|
},
|
|
},
|
|
physics: _shouldDisableScroll
|
|
physics: _shouldDisableScroll
|
|
? const NeverScrollableScrollPhysics()
|
|
? const NeverScrollableScrollPhysics()
|