|
|
@ -64,7 +64,8 @@ class RssSourceViewModel(application: Application) : BaseViewModel(application) |
|
|
|
execute { |
|
|
|
execute { |
|
|
|
App.db.rssSourceDao().getRssSources(*ids.toTypedArray()).let { |
|
|
|
App.db.rssSourceDao().getRssSources(*ids.toTypedArray()).let { |
|
|
|
val json = GSON.toJson(it) |
|
|
|
val json = GSON.toJson(it) |
|
|
|
val file = FileHelp.getFile(Backup.exportPath + File.separator + "exportRssSource.json") |
|
|
|
val file = |
|
|
|
|
|
|
|
FileHelp.getFile(Backup.exportPath + File.separator + "exportRssSource.json") |
|
|
|
file.writeText(json) |
|
|
|
file.writeText(json) |
|
|
|
} |
|
|
|
} |
|
|
|
}.onSuccess { |
|
|
|
}.onSuccess { |
|
|
@ -165,7 +166,7 @@ class RssSourceViewModel(application: Application) : BaseViewModel(application) |
|
|
|
else -> "格式不对" |
|
|
|
else -> "格式不对" |
|
|
|
} |
|
|
|
} |
|
|
|
}.onError { |
|
|
|
}.onError { |
|
|
|
finally(it.localizedMessage) |
|
|
|
finally(it.localizedMessage ?: "") |
|
|
|
}.onSuccess { |
|
|
|
}.onSuccess { |
|
|
|
finally(it ?: "导入完成") |
|
|
|
finally(it ?: "导入完成") |
|
|
|
} |
|
|
|
} |
|
|
|