|
|
@@ -82,13 +82,18 @@ extension MOLinePkView: MOLinePKViewModelDelegate {
|
|
|
func onLinePkCampInfoChanged(viewModel: MOLinePKViewModel) {
|
|
|
if let ownerInfo = viewModel.curOwnerCampInfo {
|
|
|
let avatars = ownerInfo.topUsers.compactMap({ $0.avatar })
|
|
|
- ownerTopUsersView.setupAvatars(with: avatars)
|
|
|
- ownerTopUsersView.haveMvp = !avatars.isEmpty
|
|
|
+ if avatars.count > 0 {
|
|
|
+ ownerTopUsersView.setupAvatars(with: avatars)
|
|
|
+ ownerTopUsersView.haveMvp = !avatars.isEmpty
|
|
|
+ }
|
|
|
curOwnerCampInfo = ownerInfo
|
|
|
}
|
|
|
|
|
|
if let peerInfo = viewModel.curPeerCampInfo {
|
|
|
- peerTopUsersView.setupAvatars(with: peerInfo.topUsers.compactMap({ $0.avatar }))
|
|
|
+ let avatars = peerInfo.topUsers.compactMap({ $0.avatar })
|
|
|
+ if avatars.count > 0 {
|
|
|
+ peerTopUsersView.setupAvatars(with: avatars)
|
|
|
+ }
|
|
|
curPeerCampInfo = peerInfo
|
|
|
}
|
|
|
}
|