mirror of
https://github.com/bitwarden/android.git
synced 2026-05-23 14:41:59 -05:00
Clear focus when the Activity stops (#1401)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user