-
Notifications
You must be signed in to change notification settings - Fork 46
Description
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.