mirror of
https://github.com/geode-sdk/android-launcher.git
synced 2026-10-22 00:42:38 +00:00
show more info in errors
This commit is contained in:
2 files changed
+17
-2
No files matched your search
@@ -54,6 +54,7 @@ import com.geode.launcher.UserDirectoryProvider
|
|||||||
import com.geode.launcher.ui.theme.Typography
|
import com.geode.launcher.ui.theme.Typography
|
||||||
import com.geode.launcher.utils.GamePackageUtils
|
import com.geode.launcher.utils.GamePackageUtils
|
||||||
import com.geode.launcher.utils.LaunchUtils
|
import com.geode.launcher.utils.LaunchUtils
|
||||||
|
import com.geode.launcher.utils.PreferenceUtils
|
||||||
|
|
||||||
data class LoadFailureInfo(
|
data class LoadFailureInfo(
|
||||||
val title: LaunchUtils.LauncherError,
|
val title: LaunchUtils.LauncherError,
|
||||||
@@ -151,6 +152,15 @@ fun onShowLogs(context: Context) {
|
|||||||
|
|
||||||
@Composable
|
@Composable
|
||||||
fun ErrorInfoDescription(description: String, modifier: Modifier = Modifier) {
|
fun ErrorInfoDescription(description: String, modifier: Modifier = Modifier) {
|
||||||
|
val context = LocalContext.current
|
||||||
|
val currentRelease = remember {
|
||||||
|
PreferenceUtils.get(context).getString(PreferenceUtils.Key.CURRENT_VERSION_TAG)
|
||||||
|
}
|
||||||
|
|
||||||
|
val gameVersion = remember {
|
||||||
|
GamePackageUtils.getUnifiedVersionName(context.packageManager)
|
||||||
|
}
|
||||||
|
|
||||||
Column(modifier = modifier) {
|
Column(modifier = modifier) {
|
||||||
Text(
|
Text(
|
||||||
stringResource(R.string.launcher_error_details),
|
stringResource(R.string.launcher_error_details),
|
||||||
@@ -168,7 +178,12 @@ fun ErrorInfoDescription(description: String, modifier: Modifier = Modifier) {
|
|||||||
Spacer(Modifier.size(4.dp))
|
Spacer(Modifier.size(4.dp))
|
||||||
|
|
||||||
Text(
|
Text(
|
||||||
stringResource(R.string.launcher_error_device_info, Build.MODEL, Build.VERSION.RELEASE),
|
stringResource(R.string.launcher_error_device_info,
|
||||||
|
Build.MODEL,
|
||||||
|
Build.VERSION.RELEASE,
|
||||||
|
currentRelease ?: "unknown",
|
||||||
|
gameVersion
|
||||||
|
),
|
||||||
style = Typography.labelMedium
|
style = Typography.labelMedium
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -45,7 +45,7 @@
|
|||||||
<string name="launcher_error_copy">Copy details</string>
|
<string name="launcher_error_copy">Copy details</string>
|
||||||
<string name="launcher_error_export_crash">Share crash</string>
|
<string name="launcher_error_export_crash">Share crash</string>
|
||||||
<string name="launcher_error_export_missing">No crash dump was found!</string>
|
<string name="launcher_error_export_missing">No crash dump was found!</string>
|
||||||
<string name="launcher_error_device_info">Android %2$s, %1$s</string>
|
<string name="launcher_error_device_info">Android %2$s, %1$s\nGeometry Dash %4$s with Geode %3$s</string>
|
||||||
|
|
||||||
<string name="launcher_notification_settings">Launcher Settings</string>
|
<string name="launcher_notification_settings">Launcher Settings</string>
|
||||||
<string name="launcher_notification_update_failed">Failed to check for updates.</string>
|
<string name="launcher_notification_update_failed">Failed to check for updates.</string>
|
||||||
|
|||||||
Reference in new issue
Block a user