summaryrefslogtreecommitdiffhomepage
path: root/ui/src/main/java
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2020-09-22 20:37:41 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2020-09-22 23:54:38 +0200
commit03189e7b20b326b83ab484c436214f1610334c73 (patch)
tree969ce8414b0cbabf666bc5e11fc48bac634dd4c4 /ui/src/main/java
parent10bb413187cb205e3e294f3e0b27fe0d31a959f6 (diff)
tv: add text when there are no tunnels
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'ui/src/main/java')
-rw-r--r--ui/src/main/java/com/wireguard/android/activity/TvMainActivity.kt2
1 files changed, 2 insertions, 0 deletions
diff --git a/ui/src/main/java/com/wireguard/android/activity/TvMainActivity.kt b/ui/src/main/java/com/wireguard/android/activity/TvMainActivity.kt
index d6840993..2b12d545 100644
--- a/ui/src/main/java/com/wireguard/android/activity/TvMainActivity.kt
+++ b/ui/src/main/java/com/wireguard/android/activity/TvMainActivity.kt
@@ -84,6 +84,8 @@ class TvMainActivity : AppCompatActivity() {
if (isDeleting.get()) {
try {
item.deleteAsync()
+ if (this@TvMainActivity.binding.tunnels?.isEmpty() != false)
+ isDeleting.set(false)
} catch (e: Throwable) {
val error = ErrorMessages[e]
val message = getString(R.string.config_delete_error, error)