File tree Expand file tree Collapse file tree 1 file changed +14
-12
lines changed
app/src/main/java/org/schabi/newpipe/error Expand file tree Collapse file tree 1 file changed +14
-12
lines changed Original file line number Diff line number Diff line change @@ -228,24 +228,26 @@ class ErrorActivity : AppCompatActivity() {
228228
229229 // Collapse all logs to a single paragraph when there are more than one
230230 // to keep the GitHub issue clean.
231- if (errorInfo.stackTraces.isNotEmpty() ) {
231+ if (errorInfo.stackTraces.size > 1 ) {
232232 append(" <details><summary><b>Exceptions (" )
233233 append(errorInfo.stackTraces.size)
234234 append(" )</b></summary><p>\n " )
235+ }
235236
236- // add the logs
237- errorInfo.stackTraces.forEachIndexed { index, stacktrace ->
238- append(" <details><summary><b>Crash log " )
239- if (errorInfo.stackTraces.isNotEmpty()) {
240- append(index + 1 )
241- }
242- append(" </b>" )
243- append(" </summary><p>\n " )
244- append(" \n ```\n ${stacktrace} \n ```\n " )
245- append(" </details>\n " )
237+ // add the logs
238+ errorInfo.stackTraces.forEachIndexed { index, stacktrace ->
239+ append(" <details><summary><b>Crash log " )
240+ if (errorInfo.stackTraces.size > 1 ) {
241+ append(index + 1 )
246242 }
243+ append(" </b>" )
244+ append(" </summary><p>\n " )
245+ append(" \n ```\n ${stacktrace} \n ```\n " )
246+ append(" </details>\n " )
247+ }
247248
248- // make sure to close everything
249+ // make sure to close everything
250+ if (errorInfo.stackTraces.size > 1 ) {
249251 append(" </p></details>\n " )
250252 }
251253
You can’t perform that action at this time.
0 commit comments