From 351ed1992d9290c4846e0f66a9d8450780fcefa6 Mon Sep 17 00:00:00 2001 From: Hamed Hemmati Date: Thu, 7 May 2026 10:29:33 -0700 Subject: [PATCH] bug fix for reordering the cards in the home screen --- lib/ui/home/home.dart | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/ui/home/home.dart b/lib/ui/home/home.dart index 2a7d2657c..caf16b497 100644 --- a/lib/ui/home/home.dart +++ b/lib/ui/home/home.dart @@ -156,7 +156,10 @@ class _HomeState extends State { } List createList() { - final orderedCards = getOrderedCardsList(context.select((CardsDataProvider p) => p.cardOrder)); + // Copy list so select() detects reorder: profile mutates _cardOrder in place (same ref). + final orderedCards = getOrderedCardsList( + context.select((CardsDataProvider p) => List.from(p.cardOrder)), + ); final noticesCards = getNoticesCardsList(context.select((NoticesDataProvider p) => p.noticesModel)); return [...noticesCards, ...orderedCards]; }