-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Convert ErrorActivity to compose #13434
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Idadelveloper
wants to merge
11
commits into
refactor
Choose a base branch
from
error-activity
base: refactor
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 4 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
445128d
add error screen compasable
Idadelveloper e45f4d7
add error activity
Idadelveloper 75626ce
create separate privacy policy dialog
Idadelveloper 818e55d
move base activity
Idadelveloper 5a6dbfd
refactor error activity and tiny tweaks
Idadelveloper c55c636
add new compose activity and navdisplay
Idadelveloper b412c9c
refactor app to utilize new compose activity
Idadelveloper 43d8ba2
clean up arguments in the ErrorReportScreen
Idadelveloper ca747dd
get rid of redundant colors
Idadelveloper 79cc04c
tackle review issues
Idadelveloper bac8531
rename getErrorActivityIntent
Idadelveloper File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| /* | ||
| * SPDX-FileCopyrightText: 2015-2026 NewPipe contributors <https://newpipe.net> | ||
| * SPDX-License-Identifier: GPL-3.0-or-later | ||
| */ | ||
|
|
||
| package org.schabi.newpipe | ||
|
|
||
| import android.graphics.Color | ||
| import android.os.Build | ||
| import android.os.Bundle | ||
| import androidx.activity.ComponentActivity | ||
| import androidx.activity.SystemBarStyle | ||
| import androidx.activity.compose.setContent | ||
| import androidx.activity.enableEdgeToEdge | ||
| import androidx.compose.runtime.Composable | ||
| import org.schabi.newpipe.ui.theme.AppTheme | ||
|
|
||
| /** | ||
| * Base activity for Compose-based screens. Provides edge-to-edge display and | ||
| * wraps Compose content in [org.schabi.newpipe.ui.theme.AppTheme]. | ||
| * | ||
| * Subclasses should be annotated with `@AndroidEntryPoint` if they need Hilt injection. | ||
| */ | ||
| open class BaseActivity : ComponentActivity() { | ||
|
|
||
| override fun onCreate(savedInstanceState: Bundle?) { | ||
| enableEdgeToEdge( | ||
| navigationBarStyle = SystemBarStyle.Companion.auto(Color.TRANSPARENT, Color.TRANSPARENT) | ||
| ) | ||
| if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) { | ||
| window.isNavigationBarContrastEnforced = false | ||
| } | ||
| super.onCreate(savedInstanceState) | ||
| } | ||
|
|
||
| fun composeSetContent(content: @Composable () -> Unit) { | ||
| setContent { | ||
| AppTheme(content = content) | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.