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 {
|
try {
|
||||||
val context = get<Context>()
|
val context = get<Context>()
|
||||||
File(context.cacheDir, "${BuildConfig.VERSION_CODE}.md").run {
|
File(context.cacheDir, "${BuildConfig.VERSION_CODE}.md").run {
|
||||||
notes = if (exists())
|
notes = when {
|
||||||
readText()
|
exists() -> readText()
|
||||||
else {
|
Const.Url.CHANGELOG_URL.isEmpty() -> ""
|
||||||
val text = svc.fetchString(Const.Url.CHANGELOG_URL)
|
else -> {
|
||||||
writeText(text)
|
val text = svc.fetchString(Const.Url.CHANGELOG_URL)
|
||||||
text
|
writeText(text)
|
||||||
|
text
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (e: IOException) {
|
} catch (e: IOException) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user