Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PhotoManager.requestPermissionExtend() called too soon #1194

Closed
1 task done
flodaniel opened this issue Jun 8, 2022 · 4 comments · Fixed by #1214
Closed
1 task done

PhotoManager.requestPermissionExtend() called too soon #1194

flodaniel opened this issue Jun 8, 2022 · 4 comments · Fixed by #1214
Assignees
Labels
bug Something isn't working

Comments

@flodaniel
Copy link
Contributor

Which packages are you using?

stream_chat_flutter, stream_chat_persistance, stream_chat_localizations

On what platforms did you experience the issue?

iOS

What version are you using?

stream_chat_flutter: ^4.2.0
stream_chat_localizations: ^3.1.0
stream_chat_persistence: ^4.1.0

What happened?

The native iOS permissions dialog for photo access opens as soon as the _PickerWidget state is created. This is too soon, as permissions should only be requested once the user wants to send a photo/file.

Steps to reproduce

1. Use the StreamMessageInput widget in a detail page
2. Navigate from overview to detail page
3. Native iOS dialog for photo/gallery permissions appears, instead of only appearing once the user clicks the attachment button

Supporting info to reproduce

cause of the bug:
image

this shoud occur when the attachments icon is clicked the first time

Relevant log output

No response

Flutter analyze output

No response

Flutter doctor output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@flodaniel flodaniel added the bug Something isn't working label Jun 8, 2022
@imtoori imtoori self-assigned this Jun 17, 2022
@imtoori imtoori linked a pull request Jun 20, 2022 that will close this issue
@matthewfx
Copy link

@imtoori Hey, I've just updated to 4.3.0 but unfortunately, the permission alert view is still being displayed as soon as the StreamChannel widget is being displayed. It shouldn't happen until the user wants to add an attachment.

@imtoori
Copy link
Contributor

imtoori commented Jun 30, 2022

@matthewfx I think you're still using the deprecated MessageInput widget, can you try using the StreamMessageInput?
You can read here how to migrate https://getstream.io/chat/docs/sdk/flutter/guides/migration_guide_4_0/#messageinput-to-streammessageinput

@matthewfx
Copy link

@imtoori uh oh... That's possible I haven't noticed it is deprecated. Will give it a go. Thank you :)

@matthewfx
Copy link

@imtoori Just wanted to confirm that after replacing deprecated MessageInput with its successor everything works fine. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

3 participants