@@ -494,26 +494,34 @@ public void reportIssueFromTranscript() {
494
494
TerminalSession session = mActivity .getCurrentSession ();
495
495
if (session == null ) return ;
496
496
497
- String transcriptText = ShellUtils .getTerminalSessionTranscriptText (session , false , true );
497
+ final String transcriptText = ShellUtils .getTerminalSessionTranscriptText (session , false , true );
498
498
if (transcriptText == null ) return ;
499
499
500
- transcriptText = DataUtils .getTruncatedCommandOutput (transcriptText , DataUtils .TRANSACTION_SIZE_LIMIT_IN_BYTES , false , true , false ).trim ();
500
+ Logger .showToast (mActivity , mActivity .getString (R .string .msg_generating_report ), true );
501
+
502
+ new Thread () {
503
+ @ Override
504
+ public void run () {
501
505
502
- StringBuilder reportString = new StringBuilder ();
506
+ String transcriptTextTruncated = DataUtils . getTruncatedCommandOutput ( transcriptText , DataUtils . TRANSACTION_SIZE_LIMIT_IN_BYTES , false , true , false ). trim ();
503
507
504
- String title = TermuxConstants . TERMUX_APP_NAME + " Report Issue" ;
508
+ StringBuilder reportString = new StringBuilder () ;
505
509
506
- reportString .append ("## Transcript\n " );
507
- reportString .append ("\n " ).append (MarkdownUtils .getMarkdownCodeForString (transcriptText , true ));
510
+ String title = TermuxConstants .TERMUX_APP_NAME + " Report Issue" ;
508
511
509
- reportString .append ("\n \n " ). append ( TermuxUtils . getAppInfoMarkdownString ( mActivity , true ) );
510
- reportString .append ("\n \n " ).append (TermuxUtils . getDeviceInfoMarkdownString ( mActivity ));
512
+ reportString .append ("## Transcript \n " );
513
+ reportString .append ("\n " ).append (MarkdownUtils . getMarkdownCodeForString ( transcriptTextTruncated , true ));
511
514
512
- String termuxAptInfo = TermuxUtils .geAPTInfoMarkdownString (mActivity );
513
- if (termuxAptInfo != null )
514
- reportString .append ("\n \n " ).append (termuxAptInfo );
515
+ reportString .append ("\n \n " ).append (TermuxUtils .getAppInfoMarkdownString (mActivity , true ));
516
+ reportString .append ("\n \n " ).append (TermuxUtils .getDeviceInfoMarkdownString (mActivity ));
515
517
516
- ReportActivity .startReportActivity (mActivity , new ReportInfo (UserAction .REPORT_ISSUE_FROM_TRANSCRIPT , TermuxConstants .TERMUX_APP .TERMUX_ACTIVITY_NAME , title , null , reportString .toString (), "\n \n " + TermuxUtils .getReportIssueMarkdownString (mActivity ), false ));
518
+ String termuxAptInfo = TermuxUtils .geAPTInfoMarkdownString (mActivity );
519
+ if (termuxAptInfo != null )
520
+ reportString .append ("\n \n " ).append (termuxAptInfo );
521
+
522
+ ReportActivity .startReportActivity (mActivity , new ReportInfo (UserAction .REPORT_ISSUE_FROM_TRANSCRIPT , TermuxConstants .TERMUX_APP .TERMUX_ACTIVITY_NAME , title , null , reportString .toString (), "\n \n " + TermuxUtils .getReportIssueMarkdownString (mActivity ), false ));
523
+ }
524
+ }.start ();
517
525
}
518
526
519
527
public void doPaste () {
0 commit comments