Merge branch 'main' into free_ios

This commit is contained in:
Vishnu Mohandas 2024-01-26 16:59:48 +05:30 committed by GitHub
commit 32f4cd534e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -66,9 +66,14 @@ class _FullScreenMemoryDataUpdaterState
}
void removeCurrentMemory() {
setState(() {
widget.memories.removeAt(indexNotifier.value);
});
widget.memories.removeAt(indexNotifier.value);
if (widget.memories.isNotEmpty) {
setState(() {
if (widget.memories.length == indexNotifier.value) {
indexNotifier.value -= 1;
}
});
}
}
@override