From 03189e7b20b326b83ab484c436214f1610334c73 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Tue, 22 Sep 2020 20:37:41 +0200 Subject: tv: add text when there are no tunnels Signed-off-by: Jason A. Donenfeld --- ui/src/main/java/com/wireguard/android/activity/TvMainActivity.kt | 2 ++ 1 file changed, 2 insertions(+) (limited to 'ui/src/main/java') 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) -- cgit v1.2.3