Skip to content

Commit

Permalink
Optimize the upgrade feature.
Browse files Browse the repository at this point in the history
  • Loading branch information
yueeng committed Mar 3, 2024
1 parent 9ae78fb commit a8577c4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion app/src/main/java/com/github/yueeng/moebooru/Common.kt
Original file line number Diff line number Diff line change
Expand Up @@ -1056,8 +1056,9 @@ fun AppCompatActivity.checkAppUpdate(pre: Boolean = false, compare: Boolean = fa
.setTitle(name)
.setMessage(latest.body)
.setPositiveButton(getString(R.string.app_download)) { _, _ -> openWeb(url) }
.setNegativeButton(R.string.app_update_ignore) { _, _ -> MoeSettings.updateVersion.setValueToPreferences(latest.tagName) }
.apply {
if (compare) setNegativeButton(R.string.app_update_ignore) { _, _ -> MoeSettings.updateVersion.setValueToPreferences(latest.tagName) }
else setNegativeButton(R.string.app_cancel, null)
if (!pre) setNeutralButton(getString(R.string.app_pre_release)) { _, _ ->
checkAppUpdate(true)
}
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ glide_transformations = "4.3.0"
gesture_views = "2.8.3"
jsoup = "1.17.2"
uCrop = "2020.09.28"
github_api = "1.315"
github_api = "1.319"
junit = "4.13.2"
androidx_test_ext_junit = "1.1.5"
androidx_test_espresso = "3.5.1"
Expand Down

0 comments on commit a8577c4

Please sign in to comment.