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 back navigation and a NPE that was occuring on the addons list #1000

Merged
merged 1 commit into from
Jan 9, 2024

Conversation

SyncedSynapse
Copy link
Member

The addons list had the following issues:

  • A null pointer exception was occurring because the activity.setBackPressedListener was being called in onAttach/onDetach, and on the addons list, this happens in 2 different fragments: AddonListContainerFragment and AddonTabsFragment. These 2 fragments were setting backpressed listeners on the same activity (AddonsActivity), overwriting each other. Furthermore, for addons that don't have browsable content, and thus don't use the AddonTabsFragment, only the AddonInfoFragment, this back pressed listener was also set by the previous AddonListContainerFragment, which resulted in a NPE when a back was issued on the info fragment;
  • The navigation back from addon info fragments to the list container fragment was broken because of shared element transitions. The most effective way to deal with this is to remove the shared element transitions. This also improves consistency as only addons that are not browsable were able to use shared element transitions, so from the same list there were 2 different types of transitions.

The addons list had the following issues:
- A null pointer exception was occurring because the activity.setBackPressedListener was being called in onAttach/onDetach, and on the addons list, this happens in 2 different fragments: AddonListContainerFragment and AddonTabsFragment. These 2 fragments were setting backpressed listeners on the same activity (AddonsActivity), overwriting each other. Furthermore, for addons that don't have browsable content, and thus don't use the AddonTabsFragment, only the AddonInfoFragment, this back pressed listener was also set by the previous AddonListContainerFragment, which resulted in a NPE when a back was issued on the info fragment;
- The navigation back from addon info fragments to the list container fragment was broken because of shared element transitions. The most effective way to deal with this is to remove the shared element transitions. This also improves consistency as only addons that are not browsable were able to use shared element transitions, so from the same list there were 2 different types of transitions.
@SyncedSynapse SyncedSynapse merged commit 62c08dd into xbmc:master Jan 9, 2024
1 check passed
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.

1 participant