-
-
Notifications
You must be signed in to change notification settings - Fork 521
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 navigating back from an actor page should keep focus on the actors row #2788
Fix navigating back from an actor page should keep focus on the actors row #2788
Conversation
update master
… should keep focus on the actors row
It looks like the same issue also exists in the AudioNowPlayingFragment. Perhaps you can fix that file in this same pull request. |
app/src/main/java/org/jellyfin/androidtv/ui/itemdetail/FullDetailsFragment.java
Outdated
Show resolved
Hide resolved
@@ -59,7 +59,11 @@ class MyDetailsOverviewRowPresenter( | |||
} | |||
|
|||
binding.fdButtonRow.removeAllViews() | |||
for (button in row.actions) binding.fdButtonRow.addView(button) | |||
for (button in row.actions) { | |||
if (button.parent != null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This check makes the buttons never show at all.
edit: to properly fix the crash that exists without this check we should update the "MyDetailsOverViewRow" to only contain data and not views. So the TextUnderButon is instantiated in the presenter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed from "MyDetailsOverViewRow" all views; but without this check if (button.parent != null)
I cant get rid off this crash -> java.lang.IllegalStateException: The specified child already has a parent. You must call removeView() on the child's parent first.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're storing the views in the presenter instead of the viewholder right now. That means views are still re-used. You need to make sure to never re-use the views and scope them to the viewholder.
refactor to fulldetailsfragment and indentation use getChildFragmentManager on AudioNowPlaying fragment instead of supportfragment manager
Hey @fedesenmartin, are you still working on this PR/planning to finish it? |
I am not actively working on the fix. I have an idea on how to solve it, but it requires rewriting the entire view. I will continue it when I have a moment, unless there is a significant change in the code. I will leave it as a draft if that's okay with you, in case someone wants to continue it. Does that sound okay to you? @nielsvanvelzen |
Closing this PR as stale. |
Changes
FullDetailsFragment.java
andAudioNowPlayingFragment.java
FullDetailsFragment.java
Issues:
Fixes #2713