mirror of
https://github.com/geode-sdk/android-launcher.git
synced 2026-10-22 08:42:38 +00:00
further string tweaks
This commit is contained in:
2 files changed
+32
-38
No files matched your search
@@ -427,35 +427,25 @@ fun UpdateCard(releaseViewModel: ReleaseViewModel, modifier: Modifier = Modifier
|
||||
@Composable
|
||||
fun ErrorInfoBody(failureReason: LaunchUtils.LauncherError, modifier: Modifier = Modifier) {
|
||||
val headline = when (failureReason) {
|
||||
LaunchUtils.LauncherError.LINKER_NEEDS_64BIT,
|
||||
LaunchUtils.LauncherError.LINKER_NEEDS_32BIT -> stringResource(R.string.load_failed_abi_error)
|
||||
LaunchUtils.LauncherError.LINKER_FAILED -> stringResource(R.string.load_failed_link_error_description)
|
||||
LaunchUtils.LauncherError.GENERIC -> stringResource(R.string.load_failed_generic_error_description)
|
||||
LaunchUtils.LauncherError.CRASHED -> stringResource(R.string.load_failed_crashed_description)
|
||||
else -> stringResource(R.string.load_failed_generic_error_description)
|
||||
}
|
||||
|
||||
val recommendations = when (failureReason) {
|
||||
LaunchUtils.LauncherError.LINKER_NEEDS_64BIT -> listOf(
|
||||
stringResource(R.string.load_failed_recommendation_reinstall),
|
||||
stringResource(R.string.load_failed_recommendation_switch_64bit_abi),
|
||||
)
|
||||
LaunchUtils.LauncherError.LINKER_NEEDS_32BIT -> listOf(
|
||||
stringResource(R.string.load_failed_recommendation_reinstall),
|
||||
stringResource(R.string.load_failed_recommendation_switch_32bit_abi),
|
||||
)
|
||||
LaunchUtils.LauncherError.LINKER_FAILED -> listOf(
|
||||
stringResource(R.string.load_failed_recommendation_reinstall),
|
||||
stringResource(R.string.load_failed_recommendation_update),
|
||||
)
|
||||
LaunchUtils.LauncherError.GENERIC -> listOf(
|
||||
stringResource(R.string.load_failed_recommendation_reinstall),
|
||||
stringResource(R.string.load_failed_recommendation_update),
|
||||
stringResource(R.string.load_failed_recommendation_report)
|
||||
)
|
||||
LaunchUtils.LauncherError.CRASHED -> listOf(
|
||||
stringResource(R.string.load_failed_recommendation_safe_mode),
|
||||
stringResource(R.string.load_failed_recommendation_report)
|
||||
)
|
||||
else -> listOf(
|
||||
stringResource(R.string.load_failed_recommendation_reinstall),
|
||||
stringResource(R.string.load_failed_recommendation_update),
|
||||
stringResource(R.string.load_failed_recommendation_report)
|
||||
)
|
||||
}
|
||||
|
||||
Column(modifier = modifier) {
|
||||
@@ -651,12 +641,28 @@ fun DownloadRecommendation(needsUniversal: Boolean, modifier: Modifier = Modifie
|
||||
else
|
||||
stringResource(R.string.launcher_download_32bit)
|
||||
|
||||
val promptTitle = stringResource(R.string.load_failed_abi_error)
|
||||
val reinstallText = stringResource(R.string.load_failed_recommendation_reinstall)
|
||||
val recommendationText = if (needsUniversal)
|
||||
stringResource(R.string.load_failed_recommendation_switch_64bit_abi)
|
||||
else
|
||||
stringResource(R.string.load_failed_recommendation_switch_32bit_abi)
|
||||
|
||||
Column(
|
||||
modifier = modifier,
|
||||
verticalArrangement = Arrangement.spacedBy(
|
||||
12.dp, alignment = Alignment.CenterVertically
|
||||
)
|
||||
) {
|
||||
Text(promptTitle)
|
||||
Text("\u2022\u00A0\u00A0$reinstallText")
|
||||
|
||||
if (showDownload) {
|
||||
GooglePlayBadge()
|
||||
}
|
||||
|
||||
Text("\u2022\u00A0\u00A0$recommendationText")
|
||||
|
||||
ClickableText(
|
||||
text = AnnotatedString(downloadText),
|
||||
onClick = {
|
||||
@@ -668,12 +674,6 @@ fun DownloadRecommendation(needsUniversal: Boolean, modifier: Modifier = Modifie
|
||||
textDecoration = TextDecoration.Underline
|
||||
),
|
||||
)
|
||||
|
||||
if (showDownload) {
|
||||
GooglePlayBadge(
|
||||
modifier = Modifier.align(Alignment.CenterHorizontally)
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -692,15 +692,6 @@ fun ErrorInfoSheet(failureInfo: LoadFailureInfo, onDismiss: () -> Unit) {
|
||||
|
||||
Spacer(Modifier.size(16.dp))
|
||||
|
||||
ErrorInfoBody(failureInfo.title)
|
||||
|
||||
if (failureInfo.description != null && !failureInfo.title.isAbiFailure()) {
|
||||
ErrorInfoDescription(
|
||||
failureInfo.description,
|
||||
modifier = Modifier.padding(vertical = 8.dp)
|
||||
)
|
||||
}
|
||||
|
||||
if (failureInfo.title.isAbiFailure()) {
|
||||
DownloadRecommendation(
|
||||
needsUniversal = failureInfo.title == LaunchUtils.LauncherError.LINKER_NEEDS_64BIT,
|
||||
@@ -709,6 +700,15 @@ fun ErrorInfoSheet(failureInfo: LoadFailureInfo, onDismiss: () -> Unit) {
|
||||
.padding(top = 8.dp, bottom = 16.dp)
|
||||
)
|
||||
} else {
|
||||
ErrorInfoBody(failureInfo.title)
|
||||
|
||||
if (failureInfo.description != null) {
|
||||
ErrorInfoDescription(
|
||||
failureInfo.description,
|
||||
modifier = Modifier.padding(vertical = 8.dp)
|
||||
)
|
||||
}
|
||||
|
||||
ErrorInfoActions(
|
||||
extraDetails = failureInfo.extendedMessage ?: failureInfo.description,
|
||||
modifier = Modifier
|
||||
@@ -884,12 +884,6 @@ fun LaunchBlockedLabel(text: String) {
|
||||
|
||||
if (showDownload) {
|
||||
GooglePlayBadge()
|
||||
} else {
|
||||
OutlinedButton(onClick = { onSettings(context) }) {
|
||||
Icon(Icons.Filled.Settings, contentDescription = null)
|
||||
Spacer(Modifier.size(ButtonDefaults.IconSpacing))
|
||||
Text(context.getString(R.string.launcher_settings))
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<string name="launcher_settings_icon_alt">settings icon</string>
|
||||
<string name="launcher_retry_icon_alt">retry icon</string>
|
||||
<string name="geode_download_title">Geode is not installed.</string>
|
||||
<string name="game_outdated">A Geometry Dash update is required.\nYou currently have version %1$s.</string>
|
||||
<string name="game_outdated">A Geometry Dash update is required.\nYou currently have update %1$s.</string>
|
||||
<string name="geode_download_description">Geode is downloading. Please wait.</string>
|
||||
<plurals name="automatically_load_countdown">
|
||||
<item quantity="one">Automatically launching game in %1$d second.</item>
|
||||
|
||||
Reference in new issue
Block a user