|
@@ -7,6 +7,7 @@ import io.legado.app.base.BaseViewModel
|
|
|
import io.legado.app.data.appDb
|
|
import io.legado.app.data.appDb
|
|
|
import io.legado.app.data.entities.RssSource
|
|
import io.legado.app.data.entities.RssSource
|
|
|
import io.legado.app.exception.NoStackTraceException
|
|
import io.legado.app.exception.NoStackTraceException
|
|
|
|
|
+import io.legado.app.help.AppCacheManager
|
|
|
import io.legado.app.help.RuleComplete
|
|
import io.legado.app.help.RuleComplete
|
|
|
import io.legado.app.help.http.CookieStore
|
|
import io.legado.app.help.http.CookieStore
|
|
|
import io.legado.app.utils.GSON
|
|
import io.legado.app.utils.GSON
|
|
@@ -46,6 +47,8 @@ class RssSourceEditViewModel(application: Application) : BaseViewModel(applicati
|
|
|
if (it.sourceUrl != source.sourceUrl) {
|
|
if (it.sourceUrl != source.sourceUrl) {
|
|
|
appDb.rssStarDao.updateOrigin(source.sourceUrl, it.sourceUrl)
|
|
appDb.rssStarDao.updateOrigin(source.sourceUrl, it.sourceUrl)
|
|
|
appDb.rssArticleDao.updateOrigin(source.sourceUrl, it.sourceUrl)
|
|
appDb.rssArticleDao.updateOrigin(source.sourceUrl, it.sourceUrl)
|
|
|
|
|
+ appDb.cacheDao.deleteSourceVariables(it.sourceUrl)
|
|
|
|
|
+ AppCacheManager.clearSourceVariables()
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
appDb.rssSourceDao.insert(source)
|
|
appDb.rssSourceDao.insert(source)
|