[mob][photos] Minor perf improvement when deleting in DetailPage

This commit is contained in:
ashilkn 2024-09-27 15:36:31 +05:30
parent 3361c1f149
commit 58384004b4

View File

@ -355,7 +355,7 @@ class _DetailPageState extends State<DetailPage> {
return;
}
setState(() {
_files!.remove(file);
_files!.removeAt(_selectedIndexNotifier.value);
_selectedIndexNotifier.value = min(
_selectedIndexNotifier.value,
totalFiles - 2,