diff --git a/app/build.gradle.kts b/app/build.gradle.kts index 1c059d5..6b041ba 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -1,4 +1,3 @@ - import java.io.FileInputStream import java.util.Properties diff --git a/app/src/main/kotlin/com/muedsa/agetv/screens/detail/AnimeDetailViewModel.kt b/app/src/main/kotlin/com/muedsa/agetv/screens/detail/AnimeDetailViewModel.kt index 361f3e8..8ebde4a 100644 --- a/app/src/main/kotlin/com/muedsa/agetv/screens/detail/AnimeDetailViewModel.kt +++ b/app/src/main/kotlin/com/muedsa/agetv/screens/detail/AnimeDetailViewModel.kt @@ -66,16 +66,16 @@ class AnimeDetailViewModel @Inject constructor( private val _watchedEpisodeTitleSetRefreshSF = MutableStateFlow(0) val watchedEpisodeTitleMapSF = animeDetailLDSF.combine(_watchedEpisodeTitleSetRefreshSF) { animeDetailLD, _ -> - (if (animeDetailLD.type == LazyType.SUCCESS) { - animeDetailLD.data?.video?.id?.let { - episodeProgressDao.getListByAid(it) - } - } else null)?.associateBy({ it.title }, { it }) ?: emptyMap() - }.stateIn( - scope = viewModelScope, - started = SharingStarted.WhileSubscribed(5000), + (if (animeDetailLD.type == LazyType.SUCCESS) { + animeDetailLD.data?.video?.id?.let { + episodeProgressDao.getListByAid(it) + } + } else null)?.associateBy({ it.title }, { it }) ?: emptyMap() + }.stateIn( + scope = viewModelScope, + started = SharingStarted.WhileSubscribed(5000), initialValue = emptyMap() - ) + ) private fun animeDetail(aid: Int) { viewModelScope.launch { diff --git a/app/src/main/kotlin/com/muedsa/compose/tv/widget/RightSideDrawer.kt b/app/src/main/kotlin/com/muedsa/compose/tv/widget/RightSideDrawer.kt index 06603f9..83c785f 100644 --- a/app/src/main/kotlin/com/muedsa/compose/tv/widget/RightSideDrawer.kt +++ b/app/src/main/kotlin/com/muedsa/compose/tv/widget/RightSideDrawer.kt @@ -54,7 +54,8 @@ fun RightSideDrawer( Box( Modifier .fillMaxHeight() - .padding(all = 20.dp)) { + .padding(all = 20.dp) + ) { controller.ContentCompose() } } diff --git a/app/src/main/kotlin/com/muedsa/compose/tv/widget/player/DanmakuVideoPlayer.kt b/app/src/main/kotlin/com/muedsa/compose/tv/widget/player/DanmakuVideoPlayer.kt index d5fe84f..20e4e6b 100644 --- a/app/src/main/kotlin/com/muedsa/compose/tv/widget/player/DanmakuVideoPlayer.kt +++ b/app/src/main/kotlin/com/muedsa/compose/tv/widget/player/DanmakuVideoPlayer.kt @@ -226,6 +226,7 @@ fun DanmakuItemData.copyWith( userId = userId ?: this.userId, mergedType = mergedType ?: this.mergedType ) + private fun processContent(content: String): String { if (content.isBlank()) { return ""