mirror of
https://github.com/geode-sdk/android-launcher.git
synced 2026-10-22 00:42:38 +00:00
only show unsupported version once
This commit is contained in:
1 file changed
+7
-1
@@ -235,7 +235,11 @@ fun UpdateWarning() {
|
|||||||
|
|
||||||
var showUpdateWarning by remember { mutableStateOf(true) }
|
var showUpdateWarning by remember { mutableStateOf(true) }
|
||||||
|
|
||||||
if (gdVersionCode != Constants.SUPPORTED_VERSION_CODE) {
|
var lastDismissedVersion by PreferenceUtils.useLongPreference(
|
||||||
|
preferenceKey = PreferenceUtils.Key.DISMISSED_GJ_UPDATE
|
||||||
|
)
|
||||||
|
|
||||||
|
if (gdVersionCode != Constants.SUPPORTED_VERSION_CODE && gdVersionCode != lastDismissedVersion) {
|
||||||
if (showUpdateWarning) {
|
if (showUpdateWarning) {
|
||||||
AlertDialog(
|
AlertDialog(
|
||||||
icon = {
|
icon = {
|
||||||
@@ -256,6 +260,8 @@ fun UpdateWarning() {
|
|||||||
confirmButton = {
|
confirmButton = {
|
||||||
TextButton(onClick = {
|
TextButton(onClick = {
|
||||||
showUpdateWarning = false
|
showUpdateWarning = false
|
||||||
|
lastDismissedVersion = gdVersionCode
|
||||||
|
|
||||||
onLaunch(context)
|
onLaunch(context)
|
||||||
}) {
|
}) {
|
||||||
Text(stringResource(R.string.message_box_accept))
|
Text(stringResource(R.string.message_box_accept))
|
||||||
|
|||||||
Reference in new issue
Block a user