diff --git a/Yep/ViewControllers/Contacts/ContactsViewController.swift b/Yep/ViewControllers/Contacts/ContactsViewController.swift index 67e87031..5e07ef87 100644 --- a/Yep/ViewControllers/Contacts/ContactsViewController.swift +++ b/Yep/ViewControllers/Contacts/ContactsViewController.swift @@ -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 diff --git a/Yep/ViewControllers/EditProfile/EditProfileViewController.swift b/Yep/ViewControllers/EditProfile/EditProfileViewController.swift index 65a88520..73ba6ea4 100644 --- a/Yep/ViewControllers/EditProfile/EditProfileViewController.swift +++ b/Yep/ViewControllers/EditProfile/EditProfileViewController.swift @@ -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() } diff --git a/Yep/ViewControllers/SocialWorks/SocialWorkGithubViewController.swift b/Yep/ViewControllers/SocialWorks/SocialWorkGithubViewController.swift index 222960d2..c0aa8b7d 100644 --- a/Yep/ViewControllers/SocialWorks/SocialWorkGithubViewController.swift +++ b/Yep/ViewControllers/SocialWorks/SocialWorkGithubViewController.swift @@ -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)" diff --git a/Yep/Views/Cells/ChatLeftAudio/ChatLeftAudioCell.swift b/Yep/Views/Cells/ChatLeftAudio/ChatLeftAudioCell.swift index ed7f41b1..ec41f681 100644 --- a/Yep/Views/Cells/ChatLeftAudio/ChatLeftAudioCell.swift +++ b/Yep/Views/Cells/ChatLeftAudio/ChatLeftAudioCell.swift @@ -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() diff --git a/Yep/Views/Cells/ChatLeftImage/ChatLeftImageCell.swift b/Yep/Views/Cells/ChatLeftImage/ChatLeftImageCell.swift index 727cb0b9..32af72a5 100644 --- a/Yep/Views/Cells/ChatLeftImage/ChatLeftImageCell.swift +++ b/Yep/Views/Cells/ChatLeftImage/ChatLeftImageCell.swift @@ -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 diff --git a/Yep/Views/Cells/ChatLeftLocation/ChatLeftLocationCell.swift b/Yep/Views/Cells/ChatLeftLocation/ChatLeftLocationCell.swift index c911e4bc..cabb1990 100644 --- a/Yep/Views/Cells/ChatLeftLocation/ChatLeftLocationCell.swift +++ b/Yep/Views/Cells/ChatLeftLocation/ChatLeftLocationCell.swift @@ -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 diff --git a/Yep/Views/Cells/ChatLeftSocialWork/ChatLeftSocialWorkCell.swift b/Yep/Views/Cells/ChatLeftSocialWork/ChatLeftSocialWorkCell.swift index 24884068..a88707a2 100644 --- a/Yep/Views/Cells/ChatLeftSocialWork/ChatLeftSocialWorkCell.swift +++ b/Yep/Views/Cells/ChatLeftSocialWork/ChatLeftSocialWorkCell.swift @@ -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 { diff --git a/Yep/Views/Cells/ChatLeftText/ChatLeftTextCell.swift b/Yep/Views/Cells/ChatLeftText/ChatLeftTextCell.swift index 6a2856be..0a92c41d 100644 --- a/Yep/Views/Cells/ChatLeftText/ChatLeftTextCell.swift +++ b/Yep/Views/Cells/ChatLeftText/ChatLeftTextCell.swift @@ -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) } } } diff --git a/Yep/Views/Cells/ChatLeftVideo/ChatLeftVideoCell.swift b/Yep/Views/Cells/ChatLeftVideo/ChatLeftVideoCell.swift index 88ece7c4..3638a46e 100644 --- a/Yep/Views/Cells/ChatLeftVideo/ChatLeftVideoCell.swift +++ b/Yep/Views/Cells/ChatLeftVideo/ChatLeftVideoCell.swift @@ -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 diff --git a/Yep/Views/Cells/ChatRightAudio/ChatRightAudioCell.swift b/Yep/Views/Cells/ChatRightAudio/ChatRightAudioCell.swift index 8358d8a0..47a75a69 100644 --- a/Yep/Views/Cells/ChatRightAudio/ChatRightAudioCell.swift +++ b/Yep/Views/Cells/ChatRightAudio/ChatRightAudioCell.swift @@ -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() diff --git a/Yep/Views/Cells/ChatRightImage/ChatRightImageCell.swift b/Yep/Views/Cells/ChatRightImage/ChatRightImageCell.swift index 01f3d8b8..ec43f200 100644 --- a/Yep/Views/Cells/ChatRightImage/ChatRightImageCell.swift +++ b/Yep/Views/Cells/ChatRightImage/ChatRightImageCell.swift @@ -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 diff --git a/Yep/Views/Cells/ChatRightLocation/ChatRightLocationCell.swift b/Yep/Views/Cells/ChatRightLocation/ChatRightLocationCell.swift index ef07f55c..22a91ed0 100644 --- a/Yep/Views/Cells/ChatRightLocation/ChatRightLocationCell.swift +++ b/Yep/Views/Cells/ChatRightLocation/ChatRightLocationCell.swift @@ -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 diff --git a/Yep/Views/Cells/ChatRightText/ChatRightTextCell.swift b/Yep/Views/Cells/ChatRightText/ChatRightTextCell.swift index ac4ad11b..54bfa358 100644 --- a/Yep/Views/Cells/ChatRightText/ChatRightTextCell.swift +++ b/Yep/Views/Cells/ChatRightText/ChatRightTextCell.swift @@ -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) } } } diff --git a/Yep/Views/Cells/ChatRightVideo/ChatRightVideoCell.swift b/Yep/Views/Cells/ChatRightVideo/ChatRightVideoCell.swift index bcf616a0..b038cfdb 100644 --- a/Yep/Views/Cells/ChatRightVideo/ChatRightVideoCell.swift +++ b/Yep/Views/Cells/ChatRightVideo/ChatRightVideoCell.swift @@ -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 diff --git a/Yep/Views/Cells/Contacts/ContactsCell.swift b/Yep/Views/Cells/Contacts/ContactsCell.swift index ce0919e0..472e9d58 100644 --- a/Yep/Views/Cells/Contacts/ContactsCell.swift +++ b/Yep/Views/Cells/Contacts/ContactsCell.swift @@ -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 diff --git a/Yep/Views/Cells/Conversation/ConversationCell.swift b/Yep/Views/Cells/Conversation/ConversationCell.swift index ad9ce45f..2f2f242b 100644 --- a/Yep/Views/Cells/Conversation/ConversationCell.swift +++ b/Yep/Views/Cells/Conversation/ConversationCell.swift @@ -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") diff --git a/Yep/Views/Cells/FeedBasic/FeedBasicCell.swift b/Yep/Views/Cells/FeedBasic/FeedBasicCell.swift index 567aa2d6..f43075f8 100644 --- a/Yep/Views/Cells/FeedBasic/FeedBasicCell.swift +++ b/Yep/Views/Cells/FeedBasic/FeedBasicCell.swift @@ -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 diff --git a/Yep/Views/Cells/FeedSkillUsers/FeedSkillUsersCell.swift b/Yep/Views/Cells/FeedSkillUsers/FeedSkillUsersCell.swift index 7b5a935d..2c255e5e 100644 --- a/Yep/Views/Cells/FeedSkillUsers/FeedSkillUsersCell.swift +++ b/Yep/Views/Cells/FeedSkillUsers/FeedSkillUsersCell.swift @@ -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 } diff --git a/Yep/Views/Cells/SettingsUser/SettingsUserCell.swift b/Yep/Views/Cells/SettingsUser/SettingsUserCell.swift index 9eafb986..25299cf5 100644 --- a/Yep/Views/Cells/SettingsUser/SettingsUserCell.swift +++ b/Yep/Views/Cells/SettingsUser/SettingsUserCell.swift @@ -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) } } diff --git a/Yep/Views/Feed/FeedView.swift b/Yep/Views/Feed/FeedView.swift index 51072e87..81f5d2f6 100644 --- a/Yep/Views/Feed/FeedView.swift +++ b/Yep/Views/Feed/FeedView.swift @@ -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 } diff --git a/Yep/Views/FriendRequest/FriendRequestView.swift b/Yep/Views/FriendRequest/FriendRequestView.swift index c7cfdd15..4e08da04 100644 --- a/Yep/Views/FriendRequest/FriendRequestView.swift +++ b/Yep/Views/FriendRequest/FriendRequestView.swift @@ -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 }