sangcomz / FishBun

:blowfish:FishBun is Image Picker for android.
Apache License 2.0
671 stars 144 forks source link

Fixed when FishBun.isStartInAllView(true) returned empty array to onActivityResult #256

Open LGFox opened 1 year ago

LGFox commented 1 year ago

Steps to reproduce:

  1. In WithActivityActivity.kt:147 add .isStartInAllView(true)
  2. Run demo project and select Activity in StartActivityForResult(LIGHT)
  3. Select a photo and press CHOOSE

Expected result: a photo being selected Actual result: app crashes because path at WithActivityActivity.kt:60 is null

What changed:

  1. Call finish() instead of pickerView.finishActivity() which correctly supports isStartInAllView(true)
  2. Refactored: used pickerRepository.checkForFinish() everywhere
  3. Removed extra .setIsUseAllDoneButton(true) in demo project
sangcomz commented 1 year ago

Thanks for the PR. I'll check. :)

adnandautovic commented 1 year ago

Hi @sangcomz, could you please check this PR and merge it? It's relatively small and straight forward. I was actually going to submit basically the same changes but now I saw that LGFox already did the work. Thank you for this library and your work on it.

tungcyfeer commented 1 year ago

Please merge this pj and release a new version to fix this problem, I really need this libs for upgrade sdk 33. Thank you!

cansener commented 10 months ago

Please merge this PR and release a new version.