update other navi_setAvatar withFadeTransitionDuration

This commit is contained in:
nixzhu
2015-12-03 18:06:22 +08:00
parent b67d3ae57c
commit 2eddffc666
21 changed files with 25 additions and 25 deletions
@@ -184,7 +184,7 @@ extension ContactsViewController: UITableViewDataSource, UITableViewDelegate {
}
let userAvatar = UserAvatar(userID: friend.userID, avatarStyle: miniAvatarStyle)
cell.avatarImageView.navi_setAvatar(userAvatar)
cell.avatarImageView.navi_setAvatar(userAvatar, withFadeTransitionDuration: avatarFadeTransitionDuration)
cell.nameLabel.text = friend.nickname
@@ -93,7 +93,7 @@ class EditProfileViewController: UIViewController {
let avatarSize = YepConfig.editProfileAvatarSize()
let avatarStyle: AvatarStyle = .RoundedRectangle(size: CGSize(width: avatarSize, height: avatarSize), cornerRadius: avatarSize * 0.5, borderWidth: 0)
let plainAvatar = PlainAvatar(avatarURLString: avatarURLString, avatarStyle: avatarStyle)
avatarImageView.navi_setAvatar(plainAvatar)
avatarImageView.navi_setAvatar(plainAvatar, withFadeTransitionDuration: avatarFadeTransitionDuration)
completion()
}
@@ -45,7 +45,7 @@ class SocialWorkGithubViewController: BaseViewController {
let avatarSize = avatarImageView.bounds.width
let avatarStyle: AvatarStyle = .RoundedRectangle(size: CGSize(width: avatarSize, height: avatarSize), cornerRadius: avatarSize * 0.5, borderWidth: 0)
let plainAvatar = PlainAvatar(avatarURLString: user.avatarURLString, avatarStyle: avatarStyle)
avatarImageView.navi_setAvatar(plainAvatar)
avatarImageView.navi_setAvatar(plainAvatar, withFadeTransitionDuration: avatarFadeTransitionDuration)
followersCountLabel.text = "\(user.followersCount)"
followingCountLabel.text = "\(user.followingCount)"
@@ -127,7 +127,7 @@ class ChatLeftAudioCell: ChatBaseCell {
if let sender = message.fromFriend {
let userAvatar = UserAvatar(userID: sender.userID, avatarStyle: nanoAvatarStyle)
avatarImageView.navi_setAvatar(userAvatar)
avatarImageView.navi_setAvatar(userAvatar, withFadeTransitionDuration: avatarFadeTransitionDuration)
}
layoutIfNeeded()
@@ -131,7 +131,7 @@ class ChatLeftImageCell: ChatBaseCell {
if let sender = message.fromFriend {
let userAvatar = UserAvatar(userID: sender.userID, avatarStyle: nanoAvatarStyle)
avatarImageView.navi_setAvatar(userAvatar)
avatarImageView.navi_setAvatar(userAvatar, withFadeTransitionDuration: avatarFadeTransitionDuration)
}
loadingProgress = 0
@@ -77,7 +77,7 @@ class ChatLeftLocationCell: ChatBaseCell {
if let sender = message.fromFriend {
let userAvatar = UserAvatar(userID: sender.userID, avatarStyle: nanoAvatarStyle)
avatarImageView.navi_setAvatar(userAvatar)
avatarImageView.navi_setAvatar(userAvatar, withFadeTransitionDuration: avatarFadeTransitionDuration)
}
let locationName = message.textContent
@@ -64,7 +64,7 @@ class ChatLeftSocialWorkCell: UICollectionViewCell {
if let sender = message.fromFriend {
let userAvatar = UserAvatar(userID: sender.userID, avatarStyle: nanoAvatarStyle)
avatarImageView.navi_setAvatar(userAvatar)
avatarImageView.navi_setAvatar(userAvatar, withFadeTransitionDuration: avatarFadeTransitionDuration)
}
if let socialWork = message.socialWork {
@@ -137,7 +137,7 @@ class ChatLeftTextCell: ChatBaseCell {
if let sender = message.fromFriend {
let userAvatar = UserAvatar(userID: sender.userID, avatarStyle: nanoAvatarStyle)
avatarImageView.navi_setAvatar(userAvatar)
avatarImageView.navi_setAvatar(userAvatar, withFadeTransitionDuration: avatarFadeTransitionDuration)
}
}
}
@@ -132,7 +132,7 @@ class ChatLeftVideoCell: ChatBaseCell {
if let sender = message.fromFriend {
let userAvatar = UserAvatar(userID: sender.userID, avatarStyle: nanoAvatarStyle)
avatarImageView.navi_setAvatar(userAvatar)
avatarImageView.navi_setAvatar(userAvatar, withFadeTransitionDuration: avatarFadeTransitionDuration)
}
loadingProgress = 0
@@ -98,7 +98,7 @@ class ChatRightAudioCell: ChatRightBaseCell {
if let sender = message.fromFriend {
let userAvatar = UserAvatar(userID: sender.userID, avatarStyle: nanoAvatarStyle)
avatarImageView.navi_setAvatar(userAvatar)
avatarImageView.navi_setAvatar(userAvatar, withFadeTransitionDuration: avatarFadeTransitionDuration)
}
layoutIfNeeded()
@@ -83,7 +83,7 @@ class ChatRightImageCell: ChatRightBaseCell {
if let sender = message.fromFriend {
let userAvatar = UserAvatar(userID: sender.userID, avatarStyle: nanoAvatarStyle)
avatarImageView.navi_setAvatar(userAvatar)
avatarImageView.navi_setAvatar(userAvatar, withFadeTransitionDuration: avatarFadeTransitionDuration)
}
loadingProgress = 0
@@ -70,7 +70,7 @@ class ChatRightLocationCell: ChatRightBaseCell {
if let sender = message.fromFriend {
let userAvatar = UserAvatar(userID: sender.userID, avatarStyle: nanoAvatarStyle)
avatarImageView.navi_setAvatar(userAvatar)
avatarImageView.navi_setAvatar(userAvatar, withFadeTransitionDuration: avatarFadeTransitionDuration)
}
let locationName = message.textContent
@@ -127,7 +127,7 @@ class ChatRightTextCell: ChatRightBaseCell {
if let sender = message.fromFriend {
let userAvatar = UserAvatar(userID: sender.userID, avatarStyle: nanoAvatarStyle)
avatarImageView.navi_setAvatar(userAvatar)
avatarImageView.navi_setAvatar(userAvatar, withFadeTransitionDuration: avatarFadeTransitionDuration)
}
}
}
@@ -86,7 +86,7 @@ class ChatRightVideoCell: ChatRightBaseCell {
if let sender = message.fromFriend {
let userAvatar = UserAvatar(userID: sender.userID, avatarStyle: nanoAvatarStyle)
avatarImageView.navi_setAvatar(userAvatar)
avatarImageView.navi_setAvatar(userAvatar, withFadeTransitionDuration: avatarFadeTransitionDuration)
}
dispatch_async(dispatch_get_main_queue()) { [weak self] in
+1 -1
View File
@@ -35,7 +35,7 @@ class ContactsCell: UITableViewCell {
func configureWithDiscoveredUser(discoveredUser: DiscoveredUser, tableView: UITableView, indexPath: NSIndexPath) {
let plainAvatar = PlainAvatar(avatarURLString: discoveredUser.avatarURLString, avatarStyle: miniAvatarStyle)
avatarImageView.navi_setAvatar(plainAvatar)
avatarImageView.navi_setAvatar(plainAvatar, withFadeTransitionDuration: avatarFadeTransitionDuration)
joinedDateLabel.text = discoveredUser.introduction
@@ -99,7 +99,7 @@ class ConversationCell: UITableViewCell {
self.nameLabel.text = conversationWithFriend.nickname
let userAvatar = UserAvatar(userID: conversationWithFriend.userID, avatarStyle: miniAvatarStyle)
avatarImageView.navi_setAvatar(userAvatar)
avatarImageView.navi_setAvatar(userAvatar, withFadeTransitionDuration: avatarFadeTransitionDuration)
updateInfoLabels()
}
@@ -119,13 +119,13 @@ class ConversationCell: UITableViewCell {
if let user = group.owner {
let userAvatar = UserAvatar(userID: user.userID, avatarStyle: miniAvatarStyle)
avatarImageView.navi_setAvatar(userAvatar)
avatarImageView.navi_setAvatar(userAvatar, withFadeTransitionDuration: avatarFadeTransitionDuration)
} else {
if let user = group.withFeed?.creator {
let userAvatar = UserAvatar(userID: user.userID, avatarStyle: miniAvatarStyle)
avatarImageView.navi_setAvatar(userAvatar)
avatarImageView.navi_setAvatar(userAvatar, withFadeTransitionDuration: avatarFadeTransitionDuration)
} else {
avatarImageView.image = UIImage(named: "default_avatar_60")
@@ -115,7 +115,7 @@ class FeedBasicCell: UITableViewCell {
}
let plainAvatar = PlainAvatar(avatarURLString: feed.creator.avatarURLString, avatarStyle: nanoAvatarStyle)
avatarImageView.navi_setAvatar(plainAvatar)
avatarImageView.navi_setAvatar(plainAvatar, withFadeTransitionDuration: avatarFadeTransitionDuration)
nicknameLabel.text = feed.creator.nickname
@@ -38,21 +38,21 @@ class FeedSkillUsersCell: UITableViewCell {
if let creator = feedCreators[safe: 0] {
let plainAvatar = PlainAvatar(avatarURLString: creator.avatarURLString, avatarStyle: nanoAvatarStyle)
avatarImageView1.navi_setAvatar(plainAvatar)
avatarImageView1.navi_setAvatar(plainAvatar, withFadeTransitionDuration: avatarFadeTransitionDuration)
} else {
avatarImageView1.image = nil
}
if let creator = feedCreators[safe: 1] {
let plainAvatar = PlainAvatar(avatarURLString: creator.avatarURLString, avatarStyle: nanoAvatarStyle)
avatarImageView2.navi_setAvatar(plainAvatar)
avatarImageView2.navi_setAvatar(plainAvatar, withFadeTransitionDuration: avatarFadeTransitionDuration)
} else {
avatarImageView2.image = nil
}
if let creator = feedCreators[safe: 2] {
let plainAvatar = PlainAvatar(avatarURLString: creator.avatarURLString, avatarStyle: nanoAvatarStyle)
avatarImageView3.navi_setAvatar(plainAvatar)
avatarImageView3.navi_setAvatar(plainAvatar, withFadeTransitionDuration: avatarFadeTransitionDuration)
} else {
avatarImageView3.image = nil
}
@@ -68,7 +68,7 @@ class SettingsUserCell: UITableViewCell {
let avatarSize = YepConfig.Settings.userCellAvatarSize
let avatarStyle: AvatarStyle = .RoundedRectangle(size: CGSize(width: avatarSize, height: avatarSize), cornerRadius: avatarSize * 0.5, borderWidth: 0)
let plainAvatar = PlainAvatar(avatarURLString: avatarURLString, avatarStyle: avatarStyle)
avatarImageView.navi_setAvatar(plainAvatar)
avatarImageView.navi_setAvatar(plainAvatar, withFadeTransitionDuration: avatarFadeTransitionDuration)
}
}
+1 -1
View File
@@ -304,7 +304,7 @@ class FeedView: UIView {
if let creator = feed.creator {
let userAvatar = UserAvatar(userID: creator.userID, avatarStyle: nanoAvatarStyle)
avatarImageView.navi_setAvatar(userAvatar)
avatarImageView.navi_setAvatar(userAvatar, withFadeTransitionDuration: avatarFadeTransitionDuration)
nicknameLabel.text = creator.nickname
}
@@ -52,7 +52,7 @@ class FriendRequestView: UIView {
willSet {
if let user = newValue {
let userAvatar = UserAvatar(userID: user.userID, avatarStyle: nanoAvatarStyle)
avatarImageView.navi_setAvatar(userAvatar)
avatarImageView.navi_setAvatar(userAvatar, withFadeTransitionDuration: avatarFadeTransitionDuration)
nicknameLabel.text = user.nickname
}