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

Commits on Jan 9, 2024

  1. Fix back navigation and a NPE that was occuring on the addons list

    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 committed Jan 9, 2024
    Configuration menu
    Copy the full SHA
    c1c7128 View commit details
    Browse the repository at this point in the history