mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-22 06:15:58 +00:00
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:
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))
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user