mirror of
https://github.com/bitwarden/android.git
synced 2025-03-16 03:08:50 +03:00
Clear focus when the Activity stops (#1401)
This commit is contained in:
parent
86e9a9df8a
commit
c96ba82f4b
1 changed files with 7 additions and 0 deletions
|
@ -85,6 +85,13 @@ class MainActivity : AppCompatActivity() {
|
|||
)
|
||||
}
|
||||
|
||||
override fun onStop() {
|
||||
super.onStop()
|
||||
// In some scenarios on an emulator the Activity can leak when recreated
|
||||
// if we don't first clear focus anytime we exit and return to the app.
|
||||
currentFocus?.clearFocus()
|
||||
}
|
||||
|
||||
private fun observeViewModelEvents() {
|
||||
mainViewModel
|
||||
.eventFlow
|
||||
|
|
Loading…
Add table
Reference in a new issue