File tree Expand file tree Collapse file tree 3 files changed +8
-21
lines changed
app/src/main/java/org/schabi/newpipe Expand file tree Collapse file tree 3 files changed +8
-21
lines changed Original file line number Diff line number Diff line change @@ -48,8 +48,8 @@ object ErrorReportHelper {
4848 .value(" user_comment" , comment)
4949 .end()
5050 .done()
51- } catch (e : Exception ) {
52- Log .e(TAG , " Could not build json" , e )
51+ } catch (exception : Exception ) {
52+ Log .e(TAG , " Could not build json" , exception )
5353 }
5454 return " "
5555 }
@@ -95,8 +95,8 @@ object ErrorReportHelper {
9595
9696 append(" <hr>\n " )
9797 }
98- } catch (e : Exception ) {
99- Log .e(TAG , " Could not build markdown" , e )
98+ } catch (exception : Exception ) {
99+ Log .e(TAG , " Could not build markdown" , exception )
100100 return " "
101101 }
102102 }
Original file line number Diff line number Diff line change 55
66package org.schabi.newpipe.navigation
77
8- import android.content.Intent
98import androidx.activity.compose.LocalActivity
109import androidx.compose.material3.Text
1110import androidx.compose.runtime.Composable
@@ -20,7 +19,6 @@ import androidx.navigation3.runtime.rememberNavBackStack
2019import androidx.navigation3.runtime.rememberSaveableStateHolderNavEntryDecorator
2120import androidx.navigation3.ui.NavDisplay
2221import org.schabi.newpipe.ComposeActivity
23- import org.schabi.newpipe.MainActivity
2422import org.schabi.newpipe.R
2523import org.schabi.newpipe.error.ErrorInfo
2624import org.schabi.newpipe.error.ErrorReportHelper
@@ -45,18 +43,7 @@ fun NavDisplay(startDestination: NavKey) {
4543 if (backstack.size > 1 ) {
4644 backstack.removeLastOrNull()
4745 } else {
48- // If this is the last screen in the backstack and there's no parent task,
49- // navigate to MainActivity so the user lands on the home screen.
50- activity?.let {
51- if (it.isTaskRoot) {
52- it.startActivity(
53- Intent (it, MainActivity ::class .java).apply {
54- addFlags(Intent .FLAG_ACTIVITY_CLEAR_TOP )
55- }
56- )
57- }
58- it.finish()
59- }
46+ activity?.finish()
6047 }
6148 }
6249
Original file line number Diff line number Diff line change @@ -48,6 +48,9 @@ import org.schabi.newpipe.ui.components.common.ScaffoldWithToolbar
4848import org.schabi.newpipe.ui.theme.AppTheme
4949import org.schabi.newpipe.util.Localization
5050
51+ private const val ACTION_EMAIL = " EMAIL"
52+ private const val ACTION_GITHUB = " GITHUB"
53+
5154sealed interface ErrorReportEvent {
5255 data class ReportViaEmail (val comment : String ) : ErrorReportEvent
5356 data class CopyForGitHub (val comment : String ) : ErrorReportEvent
@@ -73,9 +76,6 @@ fun ErrorReportScreen(
7376 )
7477}
7578
76- private const val ACTION_EMAIL = " EMAIL"
77- private const val ACTION_GITHUB = " GITHUB"
78-
7979@Composable
8080private fun ErrorReportContent (
8181 errorMessage : String ,
You can’t perform that action at this time.
0 commit comments