From 38c9e39c6a9ecdab6841b6cf0680ac0418cf53b2 Mon Sep 17 00:00:00 2001 From: Mygod Date: Sat, 10 Feb 2018 23:25:03 -0800 Subject: [PATCH] Refine App --- mobile/src/main/java/be/mygod/vpnhotspot/App.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mobile/src/main/java/be/mygod/vpnhotspot/App.kt b/mobile/src/main/java/be/mygod/vpnhotspot/App.kt index c396e08b..2eaf3842 100644 --- a/mobile/src/main/java/be/mygod/vpnhotspot/App.kt +++ b/mobile/src/main/java/be/mygod/vpnhotspot/App.kt @@ -28,7 +28,7 @@ class App : Application() { val handler = Handler() val pref: SharedPreferences by lazy { PreferenceManager.getDefaultSharedPreferences(this) } - val dns: String get() = app.pref.getString("service.dns", "8.8.8.8") + val dns: String get() = pref.getString("service.dns", "8.8.8.8") - fun toast(@StringRes resId: Int) = handler.post { Toast.makeText(app, resId, Toast.LENGTH_SHORT).show() } + fun toast(@StringRes resId: Int) = handler.post { Toast.makeText(this, resId, Toast.LENGTH_SHORT).show() } }