OpenSooq/Gligar

when camera disabled image at position 0 acts as camera button

LoaayElkherbawy opened this issue · 1 comments

Describe the bug
Thanks for the awesome library, However when setting camera disabled to true it only hides the capture new image button however on clicking the image at position 0 the camera is opened

To Reproduce
Steps to reproduce the behavior:

  1. Set camera disabled to true
  2. Click on the first image
  3. Camera will open instead of marking the image as selected

Expected behavior
When camera is disabled images at position 0 should be marked as selected instead of opening the camera

Additional context
The override fun onItemClicked(position: Int) {
when (position) {
0 -> openCamera()
else -> {
mainViewModel.setImageSelection(position, mImagesAdapter?.images)
}
}
} inside ImagePickerActivity ImagePickerActivity should check on the disabledCamera attribute as well not only the position I would have loved to create a branch with the fix in order to support more but am still trying to get the hang of kotlin

I have the same issue