|
|
@@ -14,6 +14,7 @@ import io.legado.app.help.http.newCallStrResponse
|
|
|
import io.legado.app.help.http.okHttpClient
|
|
|
import io.legado.app.help.source.clearExploreKindsCache
|
|
|
import io.legado.app.help.storage.ImportOldData
|
|
|
+import io.legado.app.model.SharedJsScope
|
|
|
import io.legado.app.utils.GSON
|
|
|
import io.legado.app.utils.fromJsonArray
|
|
|
import io.legado.app.utils.fromJsonObject
|
|
|
@@ -57,6 +58,9 @@ class BookSourceEditViewModel(application: Application) : BaseViewModel(applicat
|
|
|
if (oldSource.exploreUrl != source.exploreUrl) {
|
|
|
oldSource.clearExploreKindsCache()
|
|
|
}
|
|
|
+ if (oldSource.jsLib != source.jsLib) {
|
|
|
+ SharedJsScope.remove(oldSource.jsLib)
|
|
|
+ }
|
|
|
}
|
|
|
bookSource?.let {
|
|
|
appDb.bookSourceDao.delete(it)
|