|
|
@@ -197,12 +197,13 @@ class HomeFragment : BaseFragment(), OnLaunchAppListener {
|
|
|
|
|
|
motionLayout?.endState -> {
|
|
|
// Check for preferences to open the keyboard
|
|
|
- unlauncherDataSource.corePreferencesRepo.liveData().observe(viewLifecycleOwner) {
|
|
|
- if (it.activateKeyboardInDrawer) {
|
|
|
- // show the keyboard and set focus to the EditText when swiping down
|
|
|
- inputMethodManager.toggleSoftInput(InputMethodManager.SHOW_IMPLICIT, 0)
|
|
|
- app_drawer_edit_text.requestFocus()
|
|
|
- }
|
|
|
+ if (unlauncherDataSource.corePreferencesRepo.get().activateKeyboardInDrawer) {
|
|
|
+ app_drawer_edit_text.requestFocus()
|
|
|
+ // show the keyboard and set focus to the EditText when swiping down
|
|
|
+ inputMethodManager.showSoftInput(
|
|
|
+ app_drawer_edit_text,
|
|
|
+ InputMethodManager.SHOW_IMPLICIT
|
|
|
+ )
|
|
|
}
|
|
|
}
|
|
|
}
|