mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-09-13 09:26:52 -04:00
Fix #2258: Appended mail body in the logs file as well
This commit is contained in:
parent
1d82cd1a76
commit
182a2bccce
@ -84,6 +84,7 @@ open class ErrorActivity : BaseActivity() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun emailIntent(): Intent {
|
private fun emailIntent(): Intent {
|
||||||
|
val emailBody = buildBody()
|
||||||
return Intent(Intent.ACTION_SEND).apply {
|
return Intent(Intent.ACTION_SEND).apply {
|
||||||
type = "vnd.android.cursor.dir/email"
|
type = "vnd.android.cursor.dir/email"
|
||||||
putExtra(
|
putExtra(
|
||||||
@ -91,9 +92,10 @@ open class ErrorActivity : BaseActivity() {
|
|||||||
arrayOf("android-crash-feedback@kiwix.org")
|
arrayOf("android-crash-feedback@kiwix.org")
|
||||||
)
|
)
|
||||||
putExtra(Intent.EXTRA_SUBJECT, subject)
|
putExtra(Intent.EXTRA_SUBJECT, subject)
|
||||||
putExtra(Intent.EXTRA_TEXT, buildBody())
|
putExtra(Intent.EXTRA_TEXT, emailBody)
|
||||||
if (allowLogs.isChecked) {
|
if (allowLogs.isChecked) {
|
||||||
val file = fileLogger.writeLogFile(this@ErrorActivity)
|
val file = fileLogger.writeLogFile(this@ErrorActivity)
|
||||||
|
file.appendText(emailBody)
|
||||||
val path =
|
val path =
|
||||||
FileProvider.getUriForFile(
|
FileProvider.getUriForFile(
|
||||||
this@ErrorActivity,
|
this@ErrorActivity,
|
||||||
@ -113,7 +115,8 @@ open class ErrorActivity : BaseActivity() {
|
|||||||
${if (allowZims.isChecked) zimFiles() else ""}
|
${if (allowZims.isChecked) zimFiles() else ""}
|
||||||
${if (allowLanguage.isChecked) languageLocale() else ""}
|
${if (allowLanguage.isChecked) languageLocale() else ""}
|
||||||
${if (allowDeviceDetails.isChecked) deviceDetails() else ""}
|
${if (allowDeviceDetails.isChecked) deviceDetails() else ""}
|
||||||
${if (allowFileSystemDetails.isChecked) systemDetails() else ""}
|
${if (allowFileSystemDetails.isChecked) systemDetails() else ""}
|
||||||
|
|
||||||
""".trimIndent()
|
""".trimIndent()
|
||||||
|
|
||||||
private fun exceptionDetails(): String =
|
private fun exceptionDetails(): String =
|
||||||
|
Loading…
x
Reference in New Issue
Block a user