pull/66/head
kunfei 5 years ago
parent dab8cb781b
commit 788f5ce365
  1. 3
      app/src/main/java/io/legado/app/ui/main/MainViewModel.kt

@ -59,7 +59,8 @@ class MainViewModel(application: Application) : BaseViewModel(application) {
execute { execute {
val url = "https://gitee.com/alanskycn/yuedu/raw/master/JS/RSS/rssSource" val url = "https://gitee.com/alanskycn/yuedu/raw/master/JS/RSS/rssSource"
NetworkUtils.getBaseUrl(url)?.let { NetworkUtils.getBaseUrl(url)?.let {
val response = HttpHelper.getApiService<IHttpGetApi>(it).get(url, mapOf()).execute() val response =
HttpHelper.getApiService<IHttpGetApi>(it).getAsync(url, mapOf()).await()
response.body()?.let { body -> response.body()?.let { body ->
val sources = mutableListOf<RssSource>() val sources = mutableListOf<RssSource>()
val items: List<Map<String, Any>> = Restore.jsonPath.parse(body).read("$") val items: List<Map<String, Any>> = Restore.jsonPath.parse(body).read("$")

Loading…
Cancel
Save