Add app.isNatEnabled for performance and readability

Warning: This is a boring commit.
This commit is contained in:
Mygod
2016-05-24 11:52:06 +08:00
parent 461a0bda3f
commit 86f32ea67c
6 changed files with 23 additions and 34 deletions
@@ -67,7 +67,8 @@ class ShadowsocksApplication extends Application {
lazy val editor = settings.edit
lazy val profileManager = new ProfileManager(settings, dbHelper)
def isVpnEnabled = !settings.getBoolean(Key.isNAT, false)
def isNatEnabled = settings.getBoolean(Key.isNAT, false)
def isVpnEnabled = !isNatEnabled
def getVersionName = try {
getPackageManager.getPackageInfo(getPackageName, 0).versionName