1
This commit is contained in:
parent
4f402efabf
commit
d6e314a97f
@ -262,6 +262,20 @@ extension SPEpisodeView: UICollectionViewDelegate, UICollectionViewDataSource {
|
||||
|
||||
func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
|
||||
guard indexPath.row != currentIndex else { return }
|
||||
|
||||
var lastIndex = indexPath.row - 1
|
||||
var lastIsLock = false
|
||||
if lastIndex > 0 && lastIndex < self.dataArr.count {
|
||||
let lastModel = self.dataArr[lastIndex]
|
||||
lastIsLock = lastModel.is_lock ?? false
|
||||
}
|
||||
|
||||
if lastIsLock {
|
||||
SPToast.show(text: "movia_jump_unlock_error".localized)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
self.didSelectedIndex?(indexPath.row)
|
||||
self.dismiss(animated: true) {
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user