mirror of
https://github.com/oxen-io/session-android.git
synced 2025-12-09 08:21:48 +00:00
refactor: replace settings string for sharing logs, change extension to .txt to make things easier
This commit is contained in:
@@ -85,7 +85,7 @@ class SettingsActivity : PassphraseRequiredActionBarActivity() {
|
||||
helpTranslateButton.setOnClickListener { helpTranslate() }
|
||||
seedButton.setOnClickListener { showSeed() }
|
||||
clearAllDataButton.setOnClickListener { clearAllData() }
|
||||
supportButton.setOnClickListener { shareLogs() }
|
||||
debugLogButton.setOnClickListener { shareLogs() }
|
||||
val isLightMode = UiModeUtilities.isDayUiMode(this)
|
||||
oxenLogoImageView.setImageResource(if (isLightMode) R.drawable.oxen_light_mode else R.drawable.oxen_dark_mode)
|
||||
versionTextView.text = String.format(getString(R.string.version_s), "${BuildConfig.VERSION_NAME} (${BuildConfig.VERSION_CODE})")
|
||||
|
||||
@@ -40,7 +40,7 @@ class ShareLogsDialog : BaseDialog() {
|
||||
val persistentLogger = ApplicationContext.getInstance(context).persistentLogger
|
||||
try {
|
||||
val logs = persistentLogger.logs.get()
|
||||
val fileName = "${Build.MANUFACTURER}-${Build.DEVICE}-API${Build.VERSION.SDK_INT}-v${BuildConfig.VERSION_NAME}.log"
|
||||
val fileName = "${Build.MANUFACTURER}-${Build.DEVICE}-API${Build.VERSION.SDK_INT}-v${BuildConfig.VERSION_NAME}.txt"
|
||||
val logUri = BlobProvider().forData(logs.toByteArray())
|
||||
.withFileName(fileName)
|
||||
.withMimeType("text/plain")
|
||||
|
||||
Reference in New Issue
Block a user