Skip to content
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

Fix Routeractivity theming #8332

Merged
merged 3 commits into from
May 5, 2022

Conversation

litetex
Copy link
Member

@litetex litetex commented May 1, 2022

What is it?

  • Bugfix (user facing)
  • Feature (user facing)
  • Codebase improvement (dev facing)
  • Meta improvement to the project (dev facing)

Description of the changes in your PR

When the app is not running in the foreground and started via RouterActivity (e.g. clicking/sharing a link to NewPipe) incorrect things start to happens:

Why does this happen?

  • The RouterActivityThemes are overriding the color*-attributes (colorPrimary, colorPrimaryDark, ...). I'm not sure why this was done in the first place, however it causes the theming issues on the UI.
  • RouterActivity misses some code from MainActivity, e.g. assureCorrectAppLanguage and ThemeHelper.setDayNightMode. This causes further problems like the incorrect language or wrong colored theme elements.

Before/After Screenshots/Screen Record

Done via the test manual below:

  • Before:
    grafik grafik grafik grafik

  • After:
    grafik grafik grafik grafik

Fixes the following issue(s)

APK testing

The APK can be found by going to the "Checks" tab below the title. On the left pane, click on "CI", scroll down to "artifacts" and click "app" to download the zip file which contains the debug APK of this PR.

Test manual
  • Change theme to dark
  • Change the app-language to something other then the phone-languguage (e.g. German)
  • Restart the app (so that the language is applied)
  • Close the app completely
  • Share a stream link to NewPipe (that you never watched before)
  • the ask what to do dialog should come up
  • click add to playlist

Due diligence

@litetex litetex added the bug Issue is related to a bug label May 1, 2022
@Stypox
Copy link
Member

Stypox commented May 2, 2022

Why don't you remove all RouterActivity themes and use the app's ones?

Add to playlist is not implemented inside DownloadDialog ??? #7194

What?

@litetex
Copy link
Member Author

litetex commented May 2, 2022

@Stypox

Why don't you remove all RouterActivity themes and use the app's ones?

These themes hides/makes the app transparent (e.g. windowBackground).
If I use the normal themes you see half of the app in the background which wouldn't be good in my opinion.

Add to playlist is not implemented inside DownloadDialog ??? #7194
What?

PR No2 is already work in progress to fix that 😆

@litetex litetex changed the title Fix routeractivity theming Fix Routeractivity theming May 2, 2022
@litetex litetex marked this pull request as ready for review May 3, 2022 17:46
@sonarcloud
Copy link

sonarcloud bot commented May 4, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

Copy link
Member

@Redirion Redirion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

your last commit message is misleading, as it actually still is a static method :D

@Redirion Redirion merged commit 8f34f69 into TeamNewPipe:dev May 5, 2022
@litetex litetex deleted the fix-routeractivity-theming branch May 5, 2022 18:11
litetex added a commit to litetex/NewPipe that referenced this pull request Jun 4, 2022
@Stypox Stypox mentioned this pull request Jun 24, 2022
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is related to a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Download popup file already exists action buttons display issue
3 participants