summaryrefslogtreecommitdiffhomepage
path: root/ui/src
diff options
context:
space:
mode:
Diffstat (limited to 'ui/src')
-rw-r--r--ui/src/main/java/com/wireguard/android/fragment/TunnelEditorFragment.kt4
1 files changed, 2 insertions, 2 deletions
diff --git a/ui/src/main/java/com/wireguard/android/fragment/TunnelEditorFragment.kt b/ui/src/main/java/com/wireguard/android/fragment/TunnelEditorFragment.kt
index 26349211..e035210a 100644
--- a/ui/src/main/java/com/wireguard/android/fragment/TunnelEditorFragment.kt
+++ b/ui/src/main/java/com/wireguard/android/fragment/TunnelEditorFragment.kt
@@ -48,7 +48,7 @@ class TunnelEditorFragment : BaseFragment() {
if (throwable == null) {
message = getString(R.string.config_save_success, savedTunnel.name)
Log.d(TAG, message)
- Toast.makeText(requireContext(), message, Toast.LENGTH_SHORT).show()
+ Toast.makeText(activity ?: Application.get(), message, Toast.LENGTH_SHORT).show()
onFinished()
} else {
val error = ErrorMessages[throwable]
@@ -214,7 +214,7 @@ class TunnelEditorFragment : BaseFragment() {
tunnel = newTunnel
message = getString(R.string.tunnel_create_success, tunnel!!.name)
Log.d(TAG, message)
- Toast.makeText(requireContext(), message, Toast.LENGTH_SHORT).show()
+ Toast.makeText(activity ?: Application.get(), message, Toast.LENGTH_SHORT).show()
onFinished()
} else {
val error = ErrorMessages[throwable]