You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I opened this issue before and it seemed to be resolved, but one problem is still exists
I use this code to open dialog:
val launcher = rememberFilePickerLauncher(
type =
when (type) {
SELECT_FILE_CLICKED -> PickerType.Image
SELECT_VIDEO -> PickerType.Video
else -> PickerType.File(listOf("pdf"))
},
mode = PickerMode.Single,
title = Strings.getString("pic_a_file")
) { file ->
Napier.i(tag = "Dismiss", message = "file $file")
afterPick(file)
}
launcher.launch()
All works fine but when I dismiss dialog by swipe before it fully opened (and it's animated moving from bottom to top) there's no event generated and I don't know the dialog was dismissed.
And is also occurs now in DocumentPickerDelegate. Maybe it was there in previous version I can't be sure.
I also asked this question on apple developers form and waiting for response.
I think maybe it'll be good to put a delay between call the dialog and check if it will show say in 1-2 seconds. If not maybe consider that user dismissed it before it was fully drawn.
The text was updated successfully, but these errors were encountered:
I didn't update the code of DocumentPickerDelegate, so the bug was there for both since the beginning.
The problem exists on both pickers.
But it appears only when you quickly dismiss the bottom sheet before it's fully drawn.
I think it's apple issue.
"Cancel" button or swiping down when the bottom sheet is fully drawn works fine on both types of dialogs.
Maybe you consider using modal dialog.
I'll tried to do it this way
I opened this issue before and it seemed to be resolved, but one problem is still exists
I use this code to open dialog:
val launcher = rememberFilePickerLauncher(
type =
when (type) {
SELECT_FILE_CLICKED -> PickerType.Image
SELECT_VIDEO -> PickerType.Video
else -> PickerType.File(listOf("pdf"))
},
mode = PickerMode.Single,
title = Strings.getString("pic_a_file")
) { file ->
Napier.i(tag = "Dismiss", message = "file $file")
afterPick(file)
}
launcher.launch()
All works fine but when I dismiss dialog by swipe before it fully opened (and it's animated moving from bottom to top) there's no event generated and I don't know the dialog was dismissed.
And is also occurs now in DocumentPickerDelegate. Maybe it was there in previous version I can't be sure.
I also asked this question on apple developers form and waiting for response.
I think maybe it'll be good to put a delay between call the dialog and check if it will show say in 1-2 seconds. If not maybe consider that user dismissed it before it was fully drawn.
The text was updated successfully, but these errors were encountered: