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 bug in main screen tabs state management #3197

Merged
merged 1 commit into from
Mar 11, 2020

Conversation

mauriciocolli
Copy link
Contributor

@mauriciocolli mauriciocolli commented Mar 8, 2020

Tabs were not being destroyed/restored correctly due to a call to a method that populated the view pager before it even had a chance of restoring itself.

The solution was to null out the adapter before calling that method so the view pager will postpone the populating process.

@mauriciocolli mauriciocolli added ASAP Issue needs to be fixed as soon as possible bug Issue is related to a bug GUI Issue is related to the graphical user interface labels Mar 8, 2020
Tabs were not being destroyed/restored correctly due to a call to a
method that populated the view pager before it even had a chance of
restoring itself.

The solution was to null out the adapter before calling that method so
the view pager will postpone the populating process.
@mauriciocolli
Copy link
Contributor Author

Changed the way I fixed the bug.

There's also the fact that this class is deprecated and the adapter from the ViewPager2 shoud be used instead, will do the migration in the future.

@TobiGr TobiGr merged commit 33475ef into TeamNewPipe:dev Mar 11, 2020
This was referenced Mar 25, 2020
@mauriciocolli mauriciocolli deleted the fix-main-tabs branch March 30, 2020 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ASAP Issue needs to be fixed as soon as possible bug Issue is related to a bug GUI Issue is related to the graphical user interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants