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
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ class HomeFragment : RowsSupportFragment(), AudioEventListener {

//React to deletion
val dataRefreshService = get<DataRefreshService>(DataRefreshService::class.java)
if (activity != null && !requireActivity().isFinishing && currentRow != null && currentItem != null && currentItem!!.itemId != null && currentItem!!.itemId.equals(dataRefreshService.lastDeletedItemId)) {
if (activity != null && !requireActivity().isFinishing && currentRow != null && currentItem != null && currentItem!!.getItemId() != null && currentItem!!.getItemId().equals(dataRefreshService.lastDeletedItemId)) {
(currentRow!!.adapter as ItemRowAdapter).remove(currentItem)
dataRefreshService.lastDeletedItemId = null
}
Expand Down Expand Up @@ -203,7 +203,7 @@ class HomeFragment : RowsSupportFragment(), AudioEventListener {

private fun refreshCurrentItem() {
currentItem?.let { item ->
if (item.baseItemType == BaseItemKind.USER_VIEW || item.baseItemType == BaseItemKind.COLLECTION_FOLDER) return
if (item.getBaseItemType() == BaseItemKind.USER_VIEW || item.getBaseItemType() == BaseItemKind.COLLECTION_FOLDER) return

Timber.d("Refresh item ${item.getFullName(requireContext())}")

Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package org.jellyfin.androidtv.ui.itemhandling

import org.jellyfin.apiclient.model.dto.BaseItemDto

class AudioQueueItem(
index: Int,
item: BaseItemDto,
) : BaseRowItem(
index = index,
item = item,
staticHeight = true
)
Loading