parent
e068b57062
commit
3d695069a2
|
@ -75,7 +75,13 @@ class HomeService(
|
|||
}
|
||||
.map {
|
||||
val followerCount = explorerQueryRepository.getNotificationUserIds(it.id!!).size
|
||||
it.toExplorerSectionCreator(imageHost, followerCount)
|
||||
val follow = if (memberId != null) {
|
||||
explorerQueryRepository.isFollow(it.id!!, memberId = memberId)
|
||||
} else {
|
||||
false
|
||||
}
|
||||
|
||||
it.toExplorerSectionCreator(imageHost, follow, followerCount = followerCount)
|
||||
}
|
||||
|
||||
val latestContentThemeList = contentThemeService.getActiveThemeOfContent(
|
||||
|
|
|
@ -15,5 +15,6 @@ data class GetExplorerSectionCreatorResponse(
|
|||
val nickname: String,
|
||||
val tags: String,
|
||||
val profileImageUrl: String,
|
||||
val follow: Boolean,
|
||||
val followerCount: Int
|
||||
)
|
||||
|
|
|
@ -123,7 +123,11 @@ data class Member(
|
|||
}
|
||||
}
|
||||
|
||||
fun toExplorerSectionCreator(imageHost: String, followerCount: Int = 0): GetExplorerSectionCreatorResponse {
|
||||
fun toExplorerSectionCreator(
|
||||
imageHost: String,
|
||||
follow: Boolean = false,
|
||||
followerCount: Int = 0
|
||||
): GetExplorerSectionCreatorResponse {
|
||||
return GetExplorerSectionCreatorResponse(
|
||||
id = id!!,
|
||||
nickname = nickname,
|
||||
|
@ -136,7 +140,8 @@ data class Member(
|
|||
} else {
|
||||
"$imageHost/profile/default-profile.png"
|
||||
},
|
||||
followerCount = followerCount
|
||||
followerCount = followerCount,
|
||||
follow = follow
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue