Skip to content

Commit

Permalink
update: reformat code
Browse files Browse the repository at this point in the history
  • Loading branch information
muedsa committed Sep 11, 2024
1 parent 0f41bdb commit 4897a2b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 11 deletions.
1 change: 0 additions & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import java.io.FileInputStream
import java.util.Properties

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ fun RightSideDrawer(
Box(
Modifier
.fillMaxHeight()
.padding(all = 20.dp)) {
.padding(all = 20.dp)
) {
controller.ContentCompose()
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 ""
Expand Down

0 comments on commit 4897a2b

Please sign in to comment.