reset update if checked for updates, show dialog after eros is up

This commit is contained in:
Moritz Zwerger 2023-12-22 23:40:38 +01:00
parent 6eca3a93f1
commit 99096636a8
No known key found for this signature in database
GPG Key ID: 5CAD791931B09AC4
2 changed files with 8 additions and 5 deletions

View File

@ -91,11 +91,6 @@ object Eros {
start()
}
}
MinosoftUpdater::update.observe(this, true) {
if (it == null) return@observe
if (it.id == OtherProfileManager.selected.updater.dismiss) return@observe // TODO: if not searched manually
UpdateAvailableDialog(it).show()
}
}
private fun askForUpdates() {
@ -121,6 +116,13 @@ object Eros {
mainErosController.stage.show()
initialized = true
visible = true
MinosoftUpdater::update.observe(this, true) {
if (it == null) return@observe
if (it.id == OtherProfileManager.selected.updater.dismiss) return@observe // TODO: if not searched manually
UpdateAvailableDialog(it).show()
}
askForUpdates()
Log.log(LogMessageType.JAVAFX, LogLevels.VERBOSE) { "Eros up!" }
}

View File

@ -78,6 +78,7 @@ object MinosoftUpdater {
validateURL(request.toURL())
val update = request(request, error)
this.update = null // clear first to "reprompt"
this.update = update
return update
}