Skip to content

Commit 7bec539

Browse files
committed
tv: escape deletion view with back button
Signed-off-by: Jason A. Donenfeld <[email protected]>
1 parent a8dfebb commit 7bec539

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

ui/src/main/java/com/wireguard/android/activity/TvMainActivity.kt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,13 @@ class TvMainActivity : AppCompatActivity() {
135135
}
136136
}
137137

138+
override fun onBackPressed() {
139+
if (isDeleting.get())
140+
isDeleting.set(false)
141+
else
142+
super.onBackPressed()
143+
}
144+
138145
private suspend fun updateStats() {
139146
binding.tunnelList.forEach { viewItem ->
140147
val listItem = DataBindingUtil.findBinding<TvTunnelListItemBinding>(viewItem)

0 commit comments

Comments
 (0)