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

Rewrite BaseRowItem in Kotlin #2080

Merged
merged 2 commits into from
Sep 20, 2022

Conversation

nielsvanvelzen
Copy link
Member

It still uses the same garbage architecture but it's more readable now. Some future changes (until we completely replace it) are:

  • Migrate refresh function to SDK
    • Requires the baseItem property to use the SDK though, which is used in 99 places
  • Use a sealed-class for BaseRowType that contains the item

Changes

  • Rewrite BaseRowItem in Kotlin
  • Fix nullability for BaseRowItem

Issues

@nielsvanvelzen nielsvanvelzen added the refactor Improvements to code realiability, readability and quality label Sep 19, 2022
@nielsvanvelzen nielsvanvelzen added this to the v0.15.0 milestone Sep 19, 2022
Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found 11 potential problems in the proposed changes. Check the Files changed tab for more details.

).joinToString(" - ")

val timestamp = buildString {
append(SimpleDateFormat("d MMM").format(TimeUtils.convertToLocalDate(baseItem!!.startDate)))

Check warning

Code scanning / Android Lint

Implied locale in date format

To get local formatting use getDateInstance(), getDateTimeInstance(), or getTimeInstance(), or use new SimpleDateFormat(String template, Locale locale) with for example Locale.US for ASCII dates.
Copy link

@github-advanced-security github-advanced-security bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found 11 potential problems in the proposed changes. Check the Files changed tab for more details.

@nielsvanvelzen nielsvanvelzen merged commit 8d8cc41 into jellyfin:master Sep 20, 2022
@nielsvanvelzen nielsvanvelzen deleted the kt-baserowitem branch September 26, 2022 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Improvements to code realiability, readability and quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant