Skip to content

Commit

Permalink
Merge pull request #214 from enaboapps/iss213
Browse files Browse the repository at this point in the history
Don't show item scan when keyboard is visible
  • Loading branch information
enaboapps authored Mar 9, 2024
2 parents bb0eb81 + 1df1cd7 commit 7e6ebf6
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import com.enaboapps.switchify.service.menu.MenuItem
import com.enaboapps.switchify.service.menu.MenuManager
import com.enaboapps.switchify.service.menu.menus.BaseMenu
import com.enaboapps.switchify.service.scanning.ScanMethod
import com.enaboapps.switchify.service.utils.KeyboardInfo

class MainMenu(accessibilityService: SwitchifyAccessibilityService) :
BaseMenu(accessibilityService, buildMainMenuItems(accessibilityService)) {
Expand Down Expand Up @@ -34,9 +35,11 @@ class MainMenu(accessibilityService: SwitchifyAccessibilityService) :
MenuManager.getInstance().openSystemControlMenu()
})

menuItems.add(MenuItem(MenuManager.getInstance().getTypeToSwitchTo()) {
MenuManager.getInstance().changeBetweenCursorAndItemScan()
})
if (!KeyboardInfo.isKeyboardVisible) {
menuItems.add(MenuItem(MenuManager.getInstance().getTypeToSwitchTo()) {
MenuManager.getInstance().changeBetweenCursorAndItemScan()
})
}

return menuItems
}
Expand Down

0 comments on commit 7e6ebf6

Please sign in to comment.