Skip to content

Commit

Permalink
revert hiding empty items
Browse files Browse the repository at this point in the history
  • Loading branch information
GrakovNe committed Dec 22, 2024
1 parent 9ffae6f commit bd9b6cb
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 24 deletions.
4 changes: 2 additions & 2 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ android {
applicationId = "org.grakovne.lissen"
minSdk = 28
targetSdk = 35
versionCode = 58
versionName = "1.1.27"
versionCode = 59
versionName = "1.1.28"

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@ class LibraryPageResponseConverter @Inject constructor() {
.mapNotNull {
val title = it.media.metadata.title ?: return@mapNotNull null

val hasMediaItems = it.media.numAudioFiles?.let { it > 0 } ?: true
if (hasMediaItems.not()) {
return@mapNotNull null
}

Book(
id = it.id,
title = title,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,6 @@ class LibrarySearchItemsConverter @Inject constructor() {
.mapNotNull {
val title = it.media.metadata.title ?: return@mapNotNull null

val hasMediaItems = it.media.numAudioFiles?.let { it > 0 } ?: true
if (hasMediaItems.not()) {
return@mapNotNull null
}

Book(
id = it.id,
title = title,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ data class LibraryItem(
data class Media(
val duration: Double,
val metadata: LibraryMetadata,
val numAudioFiles: Int?,
)

data class LibraryMetadata(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@ class PodcastPageResponseConverter @Inject constructor() {
.mapNotNull {
val title = it.media.metadata.title ?: return@mapNotNull null

val hasMediaItems = it.media.numAudioFiles?.let { it > 0 } ?: true
if (hasMediaItems.not()) {
return@mapNotNull null
}

Book(
id = it.id,
title = title,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,6 @@ class PodcastSearchItemsConverter @Inject constructor() {
.mapNotNull {
val title = it.media.metadata.title ?: return@mapNotNull null

val hasMediaItems = it.media.numAudioFiles?.let { it > 0 } ?: true
if (hasMediaItems.not()) {
return@mapNotNull null
}

Book(
id = it.id,
title = title,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ data class PodcastItem(
data class PodcastItemMedia(
val duration: Double,
val metadata: PodcastMetadata,
val numAudioFiles: Int?,
)

data class PodcastMetadata(
Expand Down

0 comments on commit bd9b6cb

Please sign in to comment.