mirror of
https://github.com/yairm210/Unciv.git
synced 2025-07-14 17:59:11 +07:00
Removed game settings from crash report, not very helpful
This commit is contained in:
@ -9,7 +9,7 @@ class AndroidLauncher : AndroidApplication() {
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
val config = AndroidApplicationConfiguration().apply { useImmersiveMode = true }
|
||||
val game = UncivGame(BuildConfig.VERSION_NAME, UncivCrashReportSender(this))
|
||||
val game = UncivGame(BuildConfig.VERSION_NAME, CrashReportSenderAndroid(this))
|
||||
initialize(game, config)
|
||||
}
|
||||
}
|
@ -8,7 +8,7 @@ import android.widget.Toast
|
||||
import com.unciv.models.CrashReport
|
||||
import com.unciv.ui.utils.CrashReportSender
|
||||
|
||||
class UncivCrashReportSender(private val activity: Activity) : CrashReportSender {
|
||||
class CrashReportSenderAndroid(private val activity: Activity) : CrashReportSender {
|
||||
|
||||
companion object {
|
||||
private const val EMAIL_TO = "yairm210@hotmail.com"
|
||||
@ -19,8 +19,7 @@ class UncivCrashReportSender(private val activity: Activity) : CrashReportSender
|
||||
"Game version: %s\n" +
|
||||
"OS version: %s\n" +
|
||||
"Device model: %s\n" +
|
||||
"Game data: %s\n" +
|
||||
"Game settings: %s"
|
||||
"Game data: %s\n"
|
||||
}
|
||||
|
||||
override fun sendReport(report: CrashReport) {
|
||||
@ -42,5 +41,5 @@ class UncivCrashReportSender(private val activity: Activity) : CrashReportSender
|
||||
}
|
||||
|
||||
private fun buildEmailBody(report: CrashReport): String =
|
||||
EMAIL_BODY.format(report.version, Build.VERSION.SDK_INT, Build.MODEL, report.gameInfo, report.gameSettings)
|
||||
EMAIL_BODY.format(report.version, Build.VERSION.SDK_INT, Build.MODEL, report.gameInfo)
|
||||
}
|
@ -2,6 +2,5 @@ package com.unciv.models
|
||||
|
||||
data class CrashReport(
|
||||
val gameInfo: String,
|
||||
val gameSettings: String,
|
||||
val version: String
|
||||
)
|
@ -61,8 +61,7 @@ interface CrashController {
|
||||
private fun buildReport(): CrashReport {
|
||||
return UncivGame.Current.run {
|
||||
val zippedGameInfo = Json().toJson(gameInfo).let { Gzip.zip(it) }
|
||||
val zippedGameSettings = Json().toJson(settings).let { Gzip.zip(it) }
|
||||
CrashReport(zippedGameInfo, zippedGameSettings, version)
|
||||
CrashReport(zippedGameInfo, version)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user