mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-24 23:36:04 +00:00
fix(session): picking a bottom-screen mode clears the menu restore left by a teardown (#3007)
This commit is contained in:
1 parent
210c127446
commit
00525cde15
2 files changed
+10
No files matched your search
@@ -108,6 +108,15 @@ class SecondScreenProfileMigrationTest {
|
||||
}
|
||||
}
|
||||
|
||||
@Test fun pickingAnotherModeClearsTheMenuRestoreLeftByATeardown() {
|
||||
customLibrary(desktop = false)
|
||||
SessionState.bottomMenu = true
|
||||
ReflectionHelpers.callInstanceMethod<Unit>(activity, "pickSecondScreenMode",
|
||||
ReflectionHelpers.ClassParameter.from(SecondScreenMode::class.java, SecondScreenMode.KEYBOARD_TRACKPAD))
|
||||
assertFalse(SessionState.bottomMenu)
|
||||
assertEquals(SecondScreenMode.KEYBOARD_TRACKPAD.id, SessionPrefs.secondScreenPanel(activity, false))
|
||||
}
|
||||
|
||||
private fun customLibrary(desktop: Boolean): InputLibrary {
|
||||
session(desktop)
|
||||
return InputLibraries.update(activity) { library ->
|
||||
|
||||
Reference in new issue
Block a user