awkward / Tatsi

A drop-in replacement for UIImagePickerController with the ability to select multiple images and/or videos
MIT License
110 stars 30 forks source link

Picking finished imemdtiatelly when maximum set to 1 #10

Closed igorkulman closed 5 years ago

igorkulman commented 5 years ago

Interesting library, I am thinking about replacing my current implementation but I found one issue (for me). When I set config.maxNumberOfSelections = 1 and tap on some photo, the delegate fires immediately https://github.com/awkward/Tatsi/blob/c31db894583c81b69232425849a01e5dce651b30/Tatsi/Views/Assets%20Grid/AssetsGridViewController.swift#L420-L422

This is a problem in my use case (I sometimes allow the user to pick just 1 and sometimes an unlimited number of items) so I need the behavior to be consistent.

What about adding something like TatsiConfig.finishImmediatelyWithMaximumOfOne = true that I could be able to set to false?