@ -19,6 +19,7 @@ class NewUpdateDialogController(bundle: Bundle? = null) : DialogController(bundl
constructor ( update : AppUpdateResult . NewUpdate ) : this (
bundleOf (
BODY _KEY to update . release . info ,
VERSION _KEY to update . release . version ,
RELEASE _URL _KEY to update . release . releaseLink ,
DOWNLOAD _URL _KEY to update . release . getDownloadLink ( ) ,
) ,
@ -36,7 +37,8 @@ class NewUpdateDialogController(bundle: Bundle? = null) : DialogController(bundl
applicationContext ?. let { context ->
// Start download
val url = args . getString ( DOWNLOAD _URL _KEY ) !!
AppUpdateService . start ( context , url )
val version = args . getString ( VERSION _KEY )
AppUpdateService . start ( context , url , version )
}
}
. setNeutralButton ( R . string . update _check _open ) { _ , _ ->
@ -55,5 +57,6 @@ class NewUpdateDialogController(bundle: Bundle? = null) : DialogController(bundl
}
private const val BODY _KEY = " NewUpdateDialogController.body "
private const val VERSION _KEY = " NewUpdateDialogController.version "
private const val RELEASE _URL _KEY = " NewUpdateDialogController.release_url "
private const val DOWNLOAD _URL _KEY = " NewUpdateDialogController.download_url "