From a82e5b4f2cb2ff4dc06295cd938f50cd6a0dbb2a Mon Sep 17 00:00:00 2001 From: purofle Date: Tue, 31 Oct 2023 09:08:25 +0800 Subject: [PATCH] refactor: Improve Code Conformance --- app/src/main/java/io/nekohasekai/sagernet/ktx/Utils.kt | 4 +--- app/src/main/res/menu/yacd_menu.xml | 9 +++------ 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/app/src/main/java/io/nekohasekai/sagernet/ktx/Utils.kt b/app/src/main/java/io/nekohasekai/sagernet/ktx/Utils.kt index 8da7388a..513a7f32 100644 --- a/app/src/main/java/io/nekohasekai/sagernet/ktx/Utils.kt +++ b/app/src/main/java/io/nekohasekai/sagernet/ktx/Utils.kt @@ -262,9 +262,7 @@ fun Context.getColorAttr(@AttrRes resId: Int): Int { }.resourceId) } -var isExpert: Boolean - get() = BuildConfig.DEBUG || DataStore.isExpert - set(value) = TODO() +val isExpert: Boolean by lazy { BuildConfig.DEBUG || DataStore.isExpert } val isExpertFlavor = ((BuildConfig.FLAVOR == "expert") || BuildConfig.DEBUG) const val isOss = BuildConfig.FLAVOR == "oss" diff --git a/app/src/main/res/menu/yacd_menu.xml b/app/src/main/res/menu/yacd_menu.xml index ba1b1fd0..c60ceb60 100644 --- a/app/src/main/res/menu/yacd_menu.xml +++ b/app/src/main/res/menu/yacd_menu.xml @@ -1,12 +1,9 @@ - + + android:title="@string/set_panel_url" /> + android:title="@string/mal_close" />