Alert dialog for crash reports

This commit is contained in:
Thomas 2022-05-28 15:08:52 +02:00
parent f52191d0d2
commit f5fbb1b05e
3 changed files with 8 additions and 7 deletions

View File

@ -103,7 +103,7 @@ dependencies {
implementation "com.github.chrisbanes:PhotoView:2.3.0"
implementation "ch.acra:acra-mail:5.9.3"
implementation "ch.acra:acra-limiter:5.9.3"
implementation "ch.acra:acra-notification:5.9.3"
implementation "ch.acra:acra-dialog:5.9.3"
implementation "com.madgag.spongycastle:bctls-jdk15on:1.58.0.0"
implementation 'com.github.UnifiedPush:android-connector:2.0.0'

View File

@ -29,8 +29,8 @@ import com.jaredrummler.cyanea.prefs.CyaneaTheme;
import org.acra.ACRA;
import org.acra.ReportField;
import org.acra.config.CoreConfigurationBuilder;
import org.acra.config.DialogConfigurationBuilder;
import org.acra.config.MailSenderConfigurationBuilder;
import org.acra.config.NotificationConfigurationBuilder;
import org.acra.data.StringFormat;
import java.util.List;
@ -89,11 +89,13 @@ public class MainApplication extends MultiDexApplication {
.withReportFileName("crash_report.txt")
.withSubject("[Fedilab] - Crash Report " + BuildConfig.VERSION_CODE)
.build(),
new NotificationConfigurationBuilder()
new DialogConfigurationBuilder()
.withResIcon(R.mipmap.ic_launcher)
.withChannelName(getString(R.string.set_crash_reports))
.withTitle(getString(R.string.crash_title))
.withText(getString(R.string.crash_message))
.withText(getString(R.string.crash_title))
.withCommentPrompt(getString(R.string.crash_message))
.withResTheme(R.style.DialogDark)
.withPositiveButtonText(getString(R.string.send_email))
.withNegativeButtonText(getString(R.string.cancel))
.build()
).withReportContent(
ReportField.INSTALLATION_ID,

View File

@ -812,7 +812,6 @@ public class StatusAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder>
holder.binding.mediaContainer.setVisibility(View.GONE);
} else {
holder.binding.statusContent.setVisibility(View.VISIBLE);
}
} else {
holder.binding.statusContent.setVisibility(View.GONE);