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