From a7aa42d0b2d33bfce89102cfc10f4d7ff0158869 Mon Sep 17 00:00:00 2001 From: nixzhu Date: Mon, 20 Jul 2015 14:12:55 +0800 Subject: [PATCH] better set loadingProgress logic --- Yep/Views/Cells/ChatLeftVideo/ChatLeftVideoCell.swift | 2 ++ Yep/Views/Cells/ChatRightVideo/ChatRightVideoCell.swift | 2 ++ 2 files changed, 4 insertions(+) diff --git a/Yep/Views/Cells/ChatLeftVideo/ChatLeftVideoCell.swift b/Yep/Views/Cells/ChatLeftVideo/ChatLeftVideoCell.swift index 1186c579..d273db97 100644 --- a/Yep/Views/Cells/ChatLeftVideo/ChatLeftVideoCell.swift +++ b/Yep/Views/Cells/ChatLeftVideo/ChatLeftVideoCell.swift @@ -59,6 +59,8 @@ class ChatLeftVideoCell: UICollectionViewCell { if progress <= 1.0 { loadingProgress = progress + } else if progress > 1.0 { + loadingProgress = 1.0 } if let image = image { diff --git a/Yep/Views/Cells/ChatRightVideo/ChatRightVideoCell.swift b/Yep/Views/Cells/ChatRightVideo/ChatRightVideoCell.swift index 7e07317c..8620a54a 100644 --- a/Yep/Views/Cells/ChatRightVideo/ChatRightVideoCell.swift +++ b/Yep/Views/Cells/ChatRightVideo/ChatRightVideoCell.swift @@ -47,6 +47,8 @@ class ChatRightVideoCell: ChatRightBaseCell { if progress <= 1.0 { loadingProgress = progress + } else if progress > 1.0 { + loadingProgress = 1.0 } if let image = image {