Pattern code following recent change on updateAllOnlinePluginsAndLoadThem()

This commit is contained in:
Jace 2022-11-01 10:03:05 +08:00
parent 46461d862b
commit 70becf72e0

View file

@ -223,7 +223,7 @@ object PluginManager {
// Load all plugins as fast as possible! // Load all plugins as fast as possible!
loadAllOnlinePlugins(activity) loadAllOnlinePlugins(activity)
afterPluginsLoadedEvent.invoke(true) afterPluginsLoadedEvent.invoke(true)
val urls = (getKey<Array<RepositoryData>>(REPOSITORIES_KEY) val urls = (getKey<Array<RepositoryData>>(REPOSITORIES_KEY)
@ -288,9 +288,7 @@ object PluginManager {
// Load all plugins as fast as possible! // Load all plugins as fast as possible!
loadAllOnlinePlugins(activity) loadAllOnlinePlugins(activity)
ioSafe { afterPluginsLoadedEvent.invoke(true)
afterPluginsLoadedEvent.invoke(true)
}
val newDownloadPlugins = mutableListOf<String>() val newDownloadPlugins = mutableListOf<String>()
val urls = (getKey<Array<RepositoryData>>(REPOSITORIES_KEY) val urls = (getKey<Array<RepositoryData>>(REPOSITORIES_KEY)
@ -358,9 +356,9 @@ object PluginManager {
createNotification(activity, newDownloadPlugins, R.string.plugins_downloaded) createNotification(activity, newDownloadPlugins, R.string.plugins_downloaded)
} }
// ioSafe { ioSafe {
afterPluginsLoadedEvent.invoke(true) afterPluginsLoadedEvent.invoke(true)
// } }
Log.i(TAG, "Plugin download done!") Log.i(TAG, "Plugin download done!")
} }