mirror of
https://github.com/mihonapp/mihon.git
synced 2025-11-17 06:27:29 +01:00
Add notification action to open GitHub release page
Co-authored-by: Jays2Kings <Jays2Kings@users.noreply.github.com>
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user