Commit cc498eb7 by Sarkizz

修正选择逻辑

parent 955c41c1
......@@ -225,8 +225,9 @@ open class MRAlbumListViewController: UIViewController {
var removedIndex = NSNotFound
if isSelected, !self.selectedAssests.contains(assest) {
if self.selectedAssests.count == self.maxCount {
if let assests = self.assests {
removedIndex = assests.index(of: assest)
if let assests = self.assests,
let removeItem = self.selectedAssests.first {
removedIndex = assests.index(of: removeItem)
}
if removedIndex != NSNotFound,
let cell = collectionView.cellForItem(at: IndexPath(row: removedIndex, section: 0)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment