Merge pull request #1214 from GetStream/hotfix/filePicker

fix(ui): request permission only when showing the picker
This commit is contained in:
Salvatore Giordano
2022-06-20 11:51:50 +02:00
committed by GitHub
2 changed files with 20 additions and 18 deletions
@@ -9,6 +9,7 @@
- [[#996]](https://github.com/GetStream/stream-chat-flutter/issues/996) Videos break bottom photo - [[#996]](https://github.com/GetStream/stream-chat-flutter/issues/996) Videos break bottom photo
carousal. carousal.
- Fix: URLs with path and/or query params are not enriched. - Fix: URLs with path and/or query params are not enriched.
- [[#1194]](https://github.com/GetStream/stream-chat-flutter/issues/1194) Request permission to access gallery when opening the file picker.
✅ Added ✅ Added
@@ -282,6 +282,7 @@ class _StreamAttachmentPickerState extends State<StreamAttachmentPicker> {
.iconBuilder(context, _filePickerIndex == i + 1), .iconBuilder(context, _filePickerIndex == i + 1),
), ),
const Spacer(), const Spacer(),
if (widget.isOpen)
FutureBuilder( FutureBuilder(
future: PhotoManager.requestPermissionExtend(), future: PhotoManager.requestPermissionExtend(),
builder: (context, snapshot) { builder: (context, snapshot) {