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 opening user view with no collection type #2271

Conversation

nielsvanvelzen
Copy link
Member

Unable to test this (I don't have librarties without a collectiontype) but should theoretically solve the NPE from the issue.

Changes

  • Fix opening user view with no collection type

Issues

Fixes #2262

@nielsvanvelzen nielsvanvelzen added the crash Bug causing app crashes label Nov 16, 2022
@nielsvanvelzen nielsvanvelzen added this to the v0.15.0 milestone Nov 16, 2022
@@ -44,8 +46,11 @@
navigationRepository.navigate(destination);
}

public static Destination.Fragment getUserViewDestination(final org.jellyfin.sdk.model.api.BaseItemDto baseItem) {
switch (baseItem.getCollectionType()) {
public static Destination.Fragment getUserViewDestination(@Nullable final org.jellyfin.sdk.model.api.BaseItemDto baseItem) {

Check notice

Code scanning / Android Lint

Unknown nullness

Unknown nullability; explicitly declare as @Nullable or @NonNull to improve Kotlin interoperability; see https://developer.android.com/kotlin/interop#nullability_annotations
@nielsvanvelzen nielsvanvelzen merged commit 36009c5 into jellyfin:master Nov 17, 2022
@nielsvanvelzen nielsvanvelzen deleted the itemlauncher-collectiontype-null branch November 17, 2022 08:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crash Bug causing app crashes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Crash when opening OTHER library
2 participants