Skip to content

StreamVault is a TV-first free IPTV player for Android TV built with Kotlin, Jetpack Compose, Room, Hilt, and Media3.

fix(trakt): enable custom lists before refresh

David Nashashfbda12b877ec
diff --git a/feature/catalog/src/main/java/com/streamvault/feature/catalog/presentation/components/TraktCustomListAction.kt b/feature/catalog/src/main/java/com/streamvault/feature/catalog/presentation/components/TraktCustomListAction.kt
index 71a36be4..138fab48 100644
--- a/feature/catalog/src/main/java/com/streamvault/feature/catalog/presentation/components/TraktCustomListAction.kt
+++ b/feature/catalog/src/main/java/com/streamvault/feature/catalog/presentation/components/TraktCustomListAction.kt
@@ -126,7 +126,8 @@ internal fun TraktCustomListActionButton(
listDescription = ""
viewModel.refreshLists()
},
- enabled = state.connected && !operation,
+ // The custom-list state starts disconnected and is populated by this click's refresh.
+ enabled = !operation,
compact = true,
)
@@ -149,7 +150,7 @@ internal fun TraktCustomListActionButton(
if (state.refreshingLists || selectedListId?.let { it in state.loadingItems } == true || operation) {
Text(stringResource(R.string.trakt_custom_lists_loading), color = AppColors.TextSecondary)
}
- if (!state.connected && !state.refreshingLists) {
+ if (!state.connected && !state.refreshingLists && !operation) {
Text(stringResource(R.string.trakt_custom_lists_connect_first), color = AppColors.TextSecondary)
} else if (choosingItem) {
val choices = (listOf(item) + additionalItems).distinctBy { it.identity }