tv: escape deletion view with back button

Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
Jason A. Donenfeld 2020-09-23 10:08:28 +02:00
parent a8dfebb086
commit 7bec539722

View File

@ -135,6 +135,13 @@ class TvMainActivity : AppCompatActivity() {
}
}
override fun onBackPressed() {
if (isDeleting.get())
isDeleting.set(false)
else
super.onBackPressed()
}
private suspend fun updateStats() {
binding.tunnelList.forEach { viewItem ->
val listItem = DataBindingUtil.findBinding<TvTunnelListItemBinding>(viewItem)