diff --git a/sample-swift/SendBird-iOS/GroupChannel/ViewCell/CreateGroupChannelUserListTableViewCell.swift b/sample-swift/SendBird-iOS/GroupChannel/ViewCell/CreateGroupChannelUserListTableViewCell.swift index 4767c41..d65a32c 100644 --- a/sample-swift/SendBird-iOS/GroupChannel/ViewCell/CreateGroupChannelUserListTableViewCell.swift +++ b/sample-swift/SendBird-iOS/GroupChannel/ViewCell/CreateGroupChannelUserListTableViewCell.swift @@ -28,8 +28,8 @@ class CreateGroupChannelUserListTableViewCell: UITableViewCell { func setModel(aUser: SBDUser) { self.user = aUser - if self.user.profileUrl != nil { - self.profileImageView.af_setImage(withURL: URL(string: self.user.profileUrl!)!, placeholderImage:UIImage(named: "img_profile")) + if let profileUrl = self.user.profileUrl, !profileUrl.isEmpty { + self.profileImageView.af_setImage(withURL: URL(string: profileUrl)!, placeholderImage:UIImage(named: "img_profile")) } else { self.profileImageView.image = UIImage(named: "img_profile") diff --git a/sample-swift/SendBird-iOS/GroupChannel/ViewCell/SelectedUserListCollectionViewCell.swift b/sample-swift/SendBird-iOS/GroupChannel/ViewCell/SelectedUserListCollectionViewCell.swift index d50c9e8..95eceae 100644 --- a/sample-swift/SendBird-iOS/GroupChannel/ViewCell/SelectedUserListCollectionViewCell.swift +++ b/sample-swift/SendBird-iOS/GroupChannel/ViewCell/SelectedUserListCollectionViewCell.swift @@ -27,8 +27,8 @@ class SelectedUserListCollectionViewCell: UICollectionViewCell { func setModel(aUser: SBDUser) { self.user = aUser - if self.user.profileUrl != nil { - self.profileImageView.af_setImage(withURL: URL(string: self.user.profileUrl!)!, placeholderImage:UIImage(named: "img_profile")) + if let profileUrl = self.user.profileUrl, !profileUrl.isEmpty { + self.profileImageView.af_setImage(withURL: URL(string: profileUrl)!, placeholderImage:UIImage(named: "img_profile")) } else { self.profileImageView.image = UIImage(named: "img_profile")