Fix when now is xposed environment "isRunInNewXShareMode" function use host prefs to judge's bug

This commit is contained in:
2022-08-10 03:03:30 +08:00
parent 3ab997432a
commit 5f28f41188

View File

@@ -180,11 +180,13 @@ class YukiHookModulePrefs private constructor(private var context: Context? = nu
* @return [Boolean] 仅限在模块中判断 - 在 (Xposed) 宿主环境中始终返回 false
*/
val isRunInNewXShareMode
get() = runCatching {
/** 执行一次装载 */
sPref.edit()
isUsingNewXSharePrefs
}.getOrNull() ?: false
get() = if (isXposedEnvironment.not())
runCatching {
/** 执行一次装载 */
sPref.edit()
isUsingNewXSharePrefs
}.getOrNull() ?: false
else false
/**
* 自定义 Sp 存储名称