mirror of
https://github.com/wahyd4/Yep.git
synced 2026-08-15 15:55:59 +10:00
clean code
This commit is contained in:
@@ -62,27 +62,6 @@ extension UIImageView {
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
// MARK: - Message
|
||||
|
||||
private var messageImageURLKey: Void?
|
||||
|
||||
extension UIImageView {
|
||||
|
||||
private var yep_messageImageURL: NSURL? {
|
||||
return objc_getAssociatedObject(self, &messageImageURLKey) as? NSURL
|
||||
}
|
||||
|
||||
private func yep_setMessageImageURL(URL: NSURL) {
|
||||
objc_setAssociatedObject(self, &messageImageURLKey, URL, .OBJC_ASSOCIATION_RETAIN_NONATOMIC)
|
||||
}
|
||||
|
||||
func yep_setImageOfMessage(message: Message, withSize size: CGSize) {
|
||||
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
// MARK: - AttachmentURL
|
||||
|
||||
private var attachmentURLKey: Void?
|
||||
|
||||
@@ -94,8 +94,6 @@ class ChatLeftImageCell: ChatBaseCell {
|
||||
|
||||
if let image = image {
|
||||
self?.messageImageView.image = image
|
||||
|
||||
//self?.messageImageView.alpha = 1.0
|
||||
}
|
||||
}
|
||||
|
||||
@@ -107,13 +105,6 @@ class ChatLeftImageCell: ChatBaseCell {
|
||||
|
||||
dispatch_async(dispatch_get_main_queue()) { [weak self] in
|
||||
|
||||
// self?.messageImageView.image = image
|
||||
//
|
||||
// UIView.animateWithDuration(YepConfig.ChatCell.imageAppearDuration, delay: 0.0, options: .CurveEaseInOut, animations: { [weak self] in
|
||||
// self?.messageImageView.alpha = 1.0
|
||||
// }, completion: { (finished) -> Void in
|
||||
// })
|
||||
|
||||
guard let strongSelf = self else {
|
||||
return
|
||||
}
|
||||
@@ -150,10 +141,6 @@ class ChatLeftImageCell: ChatBaseCell {
|
||||
}
|
||||
|
||||
loadingProgress = 0
|
||||
|
||||
// dispatch_async(dispatch_get_main_queue()) { [weak self] in
|
||||
// self?.messageImageView.alpha = 0.0
|
||||
// }
|
||||
|
||||
if let (imageWidth, imageHeight) = imageMetaOfMessage(message) {
|
||||
|
||||
|
||||
@@ -67,13 +67,6 @@ class ChatRightImageCell: ChatRightBaseCell {
|
||||
|
||||
dispatch_async(dispatch_get_main_queue()) { [weak self] in
|
||||
|
||||
// self?.messageImageView.image = image
|
||||
//
|
||||
// UIView.animateWithDuration(YepConfig.ChatCell.imageAppearDuration, delay: 0.0, options: .CurveEaseInOut, animations: { () -> Void in
|
||||
// self?.messageImageView.alpha = 1.0
|
||||
// }, completion: { (finished) -> Void in
|
||||
// })
|
||||
|
||||
guard let strongSelf = self else {
|
||||
return
|
||||
}
|
||||
@@ -103,10 +96,6 @@ class ChatRightImageCell: ChatRightBaseCell {
|
||||
}
|
||||
|
||||
loadingProgress = 0
|
||||
|
||||
// dispatch_async(dispatch_get_main_queue()) { [weak self] in
|
||||
// self?.messageImageView.alpha = 0.0
|
||||
// }
|
||||
|
||||
if let (imageWidth, imageHeight) = imageMetaOfMessage(message) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user