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 some build warnings #6688

Merged
merged 2 commits into from
Jul 19, 2021
Merged

Conversation

litetex
Copy link
Member

@litetex litetex commented Jul 17, 2021

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

This issue fixes 2 build warnings/deprecations:
grafik

The code on these parts was relatively old (>2 years).

Description of the fixes:

  • FeedFragment: Removed updateRelativeTimeViews when the activity is paused
    We don't need to call updateRelativeTimeViews when the activity is paused, because the user likely won't notice it (because it is paused).
    Despite that onResume already calls updateRelativeTimeViews so there is no need to do that twice.
  • SubscriptionFragment: Simplified code and adjusted the style so that it's similar to FeedFragment
    The title there got set twice (no idea why). Simply copied use the same code (2 lines) from FeedFragment

Before/After Screenshots/Screen Record

not applicable

Fixes the following issue(s)

not applicable

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.

Due diligence

We don't need to call ``updateRelativeTimeViews`` when the activity is paused, because the user likely won't  notice it.
Despite that onResume already calls ``updateRelativeTimeViews`` so there is no need to do that twice.
@litetex litetex marked this pull request as ready for review July 17, 2021 15:58
Copy link
Member

@Stypox Stypox left a comment

Choose a reason for hiding this comment

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

Code looks good. I tested with a video in the feed published 19 minutes ago and after waiting 1 minute and switching to another app and then back to newpipe it became 20 minutes. Thanks :-)

@Stypox Stypox merged commit 46e7da4 into TeamNewPipe:dev Jul 19, 2021
@litetex litetex deleted the fix-some-build-warnings branch July 19, 2021 18:38
This was referenced Aug 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants