forked from recloudstream/cloudstream
Fix merge conflict
This commit is contained in:
parent
d64bf911e8
commit
18f1fba047
1 changed files with 34 additions and 29 deletions
|
@ -447,13 +447,15 @@ class MainActivity : AppCompatActivity(), ColorPickerDialogListener {
|
||||||
|
|
||||||
changeStatusBarState(isEmulatorSettings())
|
changeStatusBarState(isEmulatorSettings())
|
||||||
|
|
||||||
if (settingsManager.getBoolean(getString(R.string.auto_update_plugins_key), true)) {
|
ioSafe {
|
||||||
PluginManager.updateAllOnlinePluginsAndLoadThem(this)
|
if (settingsManager.getBoolean(getString(R.string.auto_update_plugins_key), true)) {
|
||||||
} else {
|
PluginManager.updateAllOnlinePluginsAndLoadThem(this@MainActivity)
|
||||||
PluginManager.loadAllOnlinePlugins(this)
|
} else {
|
||||||
}
|
PluginManager.loadAllOnlinePlugins(this@MainActivity)
|
||||||
|
}
|
||||||
|
|
||||||
PluginManager.loadAllLocalPlugins(this)
|
PluginManager.loadAllLocalPlugins(this@MainActivity)
|
||||||
|
}
|
||||||
|
|
||||||
// ioSafe {
|
// ioSafe {
|
||||||
// val plugins =
|
// val plugins =
|
||||||
|
@ -466,8 +468,10 @@ class MainActivity : AppCompatActivity(), ColorPickerDialogListener {
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// init accounts
|
// init accounts
|
||||||
for (api in accountManagers) {
|
ioSafe {
|
||||||
api.init()
|
for (api in accountManagers) {
|
||||||
|
api.init()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ioSafe {
|
ioSafe {
|
||||||
|
@ -482,28 +486,29 @@ class MainActivity : AppCompatActivity(), ColorPickerDialogListener {
|
||||||
|
|
||||||
SearchResultBuilder.updateCache(this)
|
SearchResultBuilder.updateCache(this)
|
||||||
|
|
||||||
|
ioSafe {
|
||||||
initAll()
|
initAll()
|
||||||
apis = allProviders
|
|
||||||
|
|
||||||
try {
|
|
||||||
getKey<Array<SettingsGeneral.CustomSite>>(USER_PROVIDER_API)?.let { list ->
|
|
||||||
list.forEach { custom ->
|
|
||||||
allProviders.firstOrNull { it.javaClass.simpleName == custom.parentJavaClass }
|
|
||||||
?.let {
|
|
||||||
allProviders.add(it.javaClass.newInstance().apply {
|
|
||||||
name = custom.name
|
|
||||||
lang = custom.lang
|
|
||||||
mainUrl = custom.url.trimEnd('/')
|
|
||||||
canBeOverridden = false
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
apis = allProviders
|
apis = allProviders
|
||||||
APIHolder.apiMap = null
|
|
||||||
} catch (e: Exception) {
|
try {
|
||||||
logError(e)
|
getKey<Array<SettingsGeneral.CustomSite>>(USER_PROVIDER_API)?.let { list ->
|
||||||
|
list.forEach { custom ->
|
||||||
|
allProviders.firstOrNull { it.javaClass.simpleName == custom.parentJavaClass }
|
||||||
|
?.let {
|
||||||
|
allProviders.add(it.javaClass.newInstance().apply {
|
||||||
|
name = custom.name
|
||||||
|
lang = custom.lang
|
||||||
|
mainUrl = custom.url.trimEnd('/')
|
||||||
|
canBeOverridden = false
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
apis = allProviders
|
||||||
|
APIHolder.apiMap = null
|
||||||
|
} catch (e: Exception) {
|
||||||
|
logError(e)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// val navView: BottomNavigationView = findViewById(R.id.nav_view)
|
// val navView: BottomNavigationView = findViewById(R.id.nav_view)
|
||||||
|
|
Loading…
Reference in a new issue