Save the store order only once the user arranges it (#2812)

* fix(stores): save the store order only once the user arranges it

* test(stores): exercise the tab save the hide toggle uses
This commit is contained in:
Kurt Himebauch authored and GitHub committed 2026-11-18 01:33:11 -05:00
1 parent bf0260de61
commit ecd74fce79
3 files changed
+19 -3

No files matched your search

@@ -42,4 +42,15 @@ class StoresTabOrderTest {
assertTrue(SessionPrefs.storesTabOrderCustomized(app))
assertEquals(mine, shown())
}
@Test
fun hidingAStoreLeavesTheOrderFollowingTheDefault() {
SessionPrefs.saveStoresTabs(app, defaults, setOf("itch"), arranged = false)
assertTrue(SessionPrefs.storesTabOrder(app).isEmpty())
val later = defaults.reversed()
SessionPrefs.settleStoresTabOrder(app, later)
assertFalse(SessionPrefs.storesTabOrderCustomized(app))
assertTrue(SessionPrefs.storesTabOrder(app).isEmpty())
assertEquals(setOf("itch"), SessionPrefs.storesTabHidden(app))
}
}