From c8187fc719e8e4ecde3bb3f2a1d11da0e7bd994b Mon Sep 17 00:00:00 2001 From: Tommy Chow Date: Sun, 10 Oct 2021 00:11:50 -0400 Subject: [PATCH] Fix excessive rebuilds when tapping the same tab --- lib/stores/home_store.dart | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/stores/home_store.dart b/lib/stores/home_store.dart index 7570940b..5532eb82 100644 --- a/lib/stores/home_store.dart +++ b/lib/stores/home_store.dart @@ -13,6 +13,8 @@ abstract class _HomeStoreBase with Store { @action void handleTap(int index) { - selectedIndex = index; + if (index != selectedIndex) { + selectedIndex = index; + } } }