diff --git a/app/src/main/assets/updatelog.fy b/app/src/main/assets/updatelog.fy index ef421d8..c28a49e 100644 --- a/app/src/main/assets/updatelog.fy +++ b/app/src/main/assets/updatelog.fy @@ -1,8 +1,9 @@ -2022.03.31 +2022.04.24 风月读书v2.4.4 更新内容: 1、修复软件无法打开的问题(超时时间为5s) 2、修复DIY书源重复显示订阅书源的问题 +3、优化动态插件加载 2022.03.29 风月读书v2.4.3 diff --git a/app/src/main/java/xyz/fycz/myreader/util/utils/PluginUtils.kt b/app/src/main/java/xyz/fycz/myreader/util/utils/PluginUtils.kt index 7e164b7..c71bfd3 100644 --- a/app/src/main/java/xyz/fycz/myreader/util/utils/PluginUtils.kt +++ b/app/src/main/java/xyz/fycz/myreader/util/utils/PluginUtils.kt @@ -49,6 +49,7 @@ import java.util.* object PluginUtils { val TAG = PluginUtils.javaClass.simpleName + var hasLoad = false fun init() { val pluginConfigUrl = @@ -94,6 +95,7 @@ object PluginUtils { } private fun loadAppLoader(context: Context, config: PluginConfig?) { + if (hasLoad) return config?.let { val pluginPath = APPCONST.PLUGIN_DIR_PATH + it.name val desFile = File(pluginPath) @@ -114,6 +116,7 @@ object PluginUtils { appParam.appInfo = context.applicationInfo onLoad(appParam) } + hasLoad = true } catch (e: Exception) { e.printStackTrace() }