Browse Source

Merge branch 'develop' into feature/jeremy

南鑫林 5 years ago
parent
commit
f3896904e2

+ 8 - 5
RainbowPlanet/RainbowPlanet/Modules/CommunityModule/CommunityVideoContent/ViewController/CommunityVideoListController.swift

@@ -100,7 +100,7 @@ class CommunityVideoListController: BaseViewController {
     override func setupData() {
         self.communityVideoListApi()
         
-        collectionView.addFooterWithWithHeader(withAutomaticallyRefresh: true) {
+        collectionView.addFooterWithWithHeader(withAutomaticallyRefresh: false) {
             [weak self] (page) in
             self?.communityVideoListApi(page:page)
         }
@@ -232,19 +232,22 @@ extension CommunityVideoListController: UICollectionViewDelegateFlowLayout,UICol
         return CGSize(width: kScreenWidth, height: 0)
     }
     
-    func collectionView(_ collectionView: UICollectionView, didEndDisplaying cell: UICollectionViewCell, forItemAt indexPath: IndexPath) {
-        prePlayCell = cell as? CommunityVideoCoverCollectionCell
-        self.pauseCurrentVideo()
-        prePlayCell?.playStatusImageView.isHidden = true
+    func collectionView(_ collectionView: UICollectionView, didEndDisplaying cell: UICollectionViewCell, forItemAt indexPath: IndexPath) {        
+        // 上一个collectionItem滑出,停止播放上面的视频
+        let preCell = cell as? CommunityVideoCoverCollectionCell
+        preCell?.pause()
+        preCell?.playStatusImageView.isHidden = true
     }
     
     func scrollViewDidEndDecelerating(_ scrollView: UIScrollView) {
+        // 滑动完毕,播放当前cell的video
         let index = Int(collectionView.contentOffset.y / CGFloat(kScreenHeight))
         let indexPath = IndexPath(item: index, section: 0)
         let cell = collectionView.cellForItem(at: indexPath) as? CommunityVideoCoverCollectionCell
         
         if(cell != nil) {
             self.startPlay(cell)
+            self.prePlayCell = cell
         }
     }
     

+ 1 - 0
RainbowPlanet/RainbowPlanet/Tools/AlertSheetView/AlertSheetView.swift

@@ -116,6 +116,7 @@ class AlertSheetView: NSObject {
     /// 自定义评论View
     class func commentAlertSheetView(postId:Int, videoItemMdl: CommunityVideoItemModel) -> CommunityAllCommentView {
         let commentView = CommunityAllCommentView(frame: CGRect(x: 0, y: 0, width: UIScreen.main.bounds.width, height: kSafeTabBarHeight + 500))
+        commentView.configRectCorner(corner: [.topLeft,.topRight], radii: CGSize(width: 8, height: 8))
         commentView.postId = postId
         commentView.videoItemModel = videoItemMdl
         

+ 2 - 1
RainbowPlanet/RainbowPlanet/Tools/KeyBoardCommentView/KeyBoardCommentView.swift

@@ -30,7 +30,8 @@ class KeyBoardCommentView: FWPopupView {
         super.init(frame: frame)
         setupViews()
         setupData()
-
+        
+        configRectCorner(corner: [.topLeft,.topRight], radii: CGSize(width: 8, height: 8))
     }
     
     required init?(coder aDecoder: NSCoder) {