mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-23 20:48:43 +00:00
Add new section to help diagnose story issues.
This commit is contained in:
committed by
Greyson Parrelli
parent
a42c3d7ce8
commit
c4632dc4a3
@@ -0,0 +1,37 @@
|
||||
package org.thoughtcrime.securesms.logsubmit
|
||||
|
||||
import android.content.Context
|
||||
import org.thoughtcrime.securesms.database.SignalDatabase
|
||||
import org.thoughtcrime.securesms.database.model.DistributionListId
|
||||
import org.thoughtcrime.securesms.recipients.RecipientId
|
||||
import org.whispersystems.signalservice.api.push.DistributionId
|
||||
|
||||
/**
|
||||
* Prints off the current SMS settings
|
||||
*/
|
||||
|
||||
class LogSectionStories : LogSection {
|
||||
override fun getTitle(): String = "STORIES"
|
||||
|
||||
override fun getContent(context: Context): CharSequence {
|
||||
val myStoryRecord = SignalDatabase.distributionLists.getList(DistributionListId.MY_STORY)
|
||||
val myStoryRecipientId = SignalDatabase.distributionLists.getRecipientId(DistributionListId.MY_STORY)
|
||||
val output = StringBuilder()
|
||||
|
||||
output.append("--- My Story\n\n")
|
||||
|
||||
if (myStoryRecord != null) {
|
||||
output.append("Database ID : ${myStoryRecord.id}\n")
|
||||
output.append("Distribution ID: ${myStoryRecord.distributionId} (Matches expected value? ${myStoryRecord.distributionId == DistributionId.MY_STORY})\n")
|
||||
output.append("Recipient ID : ${presentRecipientId(myStoryRecipientId)}\n")
|
||||
} else {
|
||||
output.append("< My story does not exist >\n")
|
||||
}
|
||||
|
||||
return output
|
||||
}
|
||||
|
||||
private fun presentRecipientId(recipientId: RecipientId?): String {
|
||||
return recipientId?.serialize() ?: "Not set"
|
||||
}
|
||||
}
|
||||
@@ -81,6 +81,7 @@ public class SubmitDebugLogRepository {
|
||||
add(new LogSectionExoPlayerPool());
|
||||
add(new LogSectionKeyPreferences());
|
||||
add(new LogSectionSMS());
|
||||
add(new LogSectionStories());
|
||||
add(new LogSectionBadges());
|
||||
add(new LogSectionPermissions());
|
||||
add(new LogSectionTrace());
|
||||
|
||||
Reference in New Issue
Block a user