From 775a53871f00dc0214e350d4b65ee141e64337bc Mon Sep 17 00:00:00 2001 From: Dan Cojocaru Date: Sun, 19 Jun 2022 08:50:14 +0300 Subject: [PATCH] Optimized list item replacement --- lib/state/projects.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/state/projects.dart b/lib/state/projects.dart index 8e31ca5..96e1858 100644 --- a/lib/state/projects.dart +++ b/lib/state/projects.dart @@ -74,7 +74,8 @@ class ProjectsState extends ChangeNotifier { index.copyWith( projects: index.projects .where((p) => p.projectId != project.projectId) - .toList() + [project] + .followedBy([project]) + .toList() ) ); }