Fix loading a canceled discover tv show (#1709)
## Description #1614 added filtering by a TV production status. I pulled the enum values from a comment in Seerr's code which spelled it as `Cancelled`, but the actual API uses `Canceled`. This PR corrects the spelling. Also, since this value isn't actually used yet, I've removed it from `TvDetails` for now. ### Related issues Fixes #1703 ### Testing Emulator, filter by production status as canceled and open any result ## Screenshots N/A ## AI or LLM usage None
This commit is contained in:
parent
c2aab06c0b
commit
39c030c1d5
4 changed files with 14 additions and 13 deletions
|
|
@ -38,6 +38,7 @@ import androidx.tv.material3.Text
|
|||
import androidx.tv.material3.surfaceColorAtElevation
|
||||
import com.github.damontecres.wholphin.R
|
||||
import com.github.damontecres.wholphin.api.seerr.model.TvDetails
|
||||
import com.github.damontecres.wholphin.api.seerr.model.TvShowStatus
|
||||
import com.github.damontecres.wholphin.data.filter.CommunityRatingFilter
|
||||
import com.github.damontecres.wholphin.data.filter.DecadeFilter
|
||||
import com.github.damontecres.wholphin.data.filter.DiscoverFilter
|
||||
|
|
@ -598,7 +599,7 @@ fun DiscoverFilterByButton(
|
|||
}
|
||||
|
||||
DiscoverTvStatusFilter -> {
|
||||
(currentValue as? List<TvDetails.Status>)
|
||||
(currentValue as? List<TvShowStatus>)
|
||||
.orEmpty()
|
||||
.contains(value.value)
|
||||
}
|
||||
|
|
@ -665,7 +666,7 @@ fun DiscoverFilterByButton(
|
|||
|
||||
DiscoverTvStatusFilter -> {
|
||||
val list =
|
||||
(currentValue as? List<TvDetails.Status>).orEmpty()
|
||||
(currentValue as? List<TvShowStatus>).orEmpty()
|
||||
val newValue =
|
||||
list
|
||||
.toMutableList()
|
||||
|
|
@ -673,7 +674,7 @@ fun DiscoverFilterByButton(
|
|||
if (isSelected) {
|
||||
remove(value.value!!)
|
||||
} else {
|
||||
add(value.value!! as TvDetails.Status)
|
||||
add(value.value!! as TvShowStatus)
|
||||
}
|
||||
}.takeIf { it.isNotEmpty() }
|
||||
filterOption.set(newValue, current)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue