Skip to content

Commit

Permalink
fix(YPLibraryVC): handle default multiple selection
Browse files Browse the repository at this point in the history
- if defaultMultipleSelection is true then enable multiple selection irrespective of number of selected items

- Github Issue: Yummypets#524

Reported-by: Saurabh Bajaj <[email protected]>
Signed-off-by: Saurabh Bajaj <[email protected]>
  • Loading branch information
saurabh-selldo committed Jul 12, 2020
1 parent f1250be commit 0d54e36
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Source/Pages/Gallery/YPLibraryVC.swift
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ public class YPLibraryVC: UIViewController, YPPermissionCheckable {
return YPLibrarySelection(index: -1, assetIdentifier: asset.localIdentifier)
}

multipleSelectionEnabled = selection.count > 1
// If defaultMultipleSelection is true then enable multiple selection irrespective of number of selected items
multipleSelectionEnabled = YPConfig.library.defaultMultipleSelection == true ? true : selection.count > 1
v.assetViewContainer.setMultipleSelectionMode(on: multipleSelectionEnabled)
v.collectionView.reloadData()
}
Expand Down

0 comments on commit 0d54e36

Please sign in to comment.