Skip to content

Commit

Permalink
Merge pull request #128 from nohana/feature/fix_reload_sections_when_…
Browse files Browse the repository at this point in the history
…selected_photo

Fixed reload sections when selected photos.
  • Loading branch information
a2444mo10 authored Dec 17, 2021
2 parents 1946ecd + 564d7f2 commit 0cd268c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -183,14 +183,14 @@ class AssetListSelectableDateSectionController: UICollectionViewController, UICo
let title = nohanaImagePickerController.config.strings.albumListTitle ?? NSLocalizedString("action.title.deselect", tableName: "NohanaImagePicker", bundle: nohanaImagePickerController.assetBundle, comment: "")
let deselect = UIAction(title: title, image: UIImage(systemName: "minus.circle"), attributes: [.destructive]) { _ in
nohanaImagePickerController.dropAsset(asset)
collectionView.reloadItems(at: [indexPath])
collectionView.reloadSections(IndexSet(integer: indexPath.section))
}
return UIMenu(title: "", children: [deselect])
} else {
let title = nohanaImagePickerController.config.strings.albumListTitle ?? NSLocalizedString("action.title.select", tableName: "NohanaImagePicker", bundle: nohanaImagePickerController.assetBundle, comment: "")
let select = UIAction(title: title, image: UIImage(systemName: "checkmark.circle")) { _ in
nohanaImagePickerController.pickAsset(asset)
collectionView.reloadItems(at: [indexPath])
collectionView.reloadSections(IndexSet(integer: indexPath.section))
}
return UIMenu(title: "", children: [select])
}
Expand Down

0 comments on commit 0cd268c

Please sign in to comment.