mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-20 05:16:01 +00:00
feat(home): choose the page the Home button opens (#2493)
* feat(home): choose the page the Home button opens As the Home app, DroidDeck always came back to whichever page was last open, and a cold start landed on Steam. A new choice under Setup > Launcher, shown while "Use as Home screen" is on, lets Home open the Android apps page instead. The default stays Steam, which keeps the current behaviour. * fix(home): a Home request for the apps page closes a page open over the rail
This commit is contained in:
1 parent
bd022f04be
commit
52bf19ad8e
7 files changed
+62
No files matched your search
@@ -87,4 +87,12 @@ class AppScaleTest {
|
||||
assertEquals(540, base.screenHeightDp)
|
||||
assertEquals(320, base.densityDpi)
|
||||
}
|
||||
|
||||
@Test fun homePageDefaultsToSteamAndIgnoresAnUnknownStoredPage() {
|
||||
assertEquals(AppUiPrefs.HOME_PAGE_STEAM, AppUiPrefs.homePage(context))
|
||||
AppUiPrefs.setHomePage(context, AppUiPrefs.HOME_PAGE_APPS)
|
||||
assertEquals(AppUiPrefs.HOME_PAGE_APPS, AppUiPrefs.homePage(context))
|
||||
context.getSharedPreferences("app-ui", Context.MODE_PRIVATE).edit().putString("home-page", "gone").commit()
|
||||
assertEquals(AppUiPrefs.HOME_PAGE_STEAM, AppUiPrefs.homePage(context))
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user