mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-01-12 07:43:36 +00:00
Skip download notes when loading notes url
This commit is contained in:
parent
8f08ae59ac
commit
4cc41eccb3
@ -67,12 +67,14 @@ class InstallViewModel(
|
||||
try {
|
||||
val context = get<Context>()
|
||||
File(context.cacheDir, "${BuildConfig.VERSION_CODE}.md").run {
|
||||
notes = if (exists())
|
||||
readText()
|
||||
else {
|
||||
val text = svc.fetchString(Const.Url.CHANGELOG_URL)
|
||||
writeText(text)
|
||||
text
|
||||
notes = when {
|
||||
exists() -> readText()
|
||||
Const.Url.CHANGELOG_URL.isEmpty() -> ""
|
||||
else -> {
|
||||
val text = svc.fetchString(Const.Url.CHANGELOG_URL)
|
||||
writeText(text)
|
||||
text
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (e: IOException) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user