Add notification action to open GitHub release page

Co-authored-by: Jays2Kings <Jays2Kings@users.noreply.github.com>
This commit is contained in:
arkon
2021-10-16 10:42:14 -04:00
parent a8c8f15e07
commit 3d8f123e05
6 changed files with 32 additions and 22 deletions

View File

@@ -336,7 +336,7 @@ class MainActivity : BaseViewBindingActivity<MainActivityBinding>() {
lifecycleScope.launchIO {
try {
val result = AppUpdateChecker().checkForUpdate()
val result = AppUpdateChecker().checkForUpdate(this@MainActivity)
if (result is AppUpdateResult.NewUpdate) {
NewUpdateDialogController(result).showDialog(router)
}

View File

@@ -107,11 +107,11 @@ class AboutController : SettingsController(), NoAppBarElevationController {
private fun checkVersion() {
if (activity == null) return
activity?.toast(R.string.update_check_look_for_updates)
activity!!.toast(R.string.update_check_look_for_updates)
launchNow {
try {
when (val result = updateChecker.checkForUpdate()) {
when (val result = updateChecker.checkForUpdate(activity!!)) {
is AppUpdateResult.NewUpdate -> {
NewUpdateDialogController(result).showDialog(router)
}