Skip to content

Conversation

@ChochaNaresh
Copy link
Owner

✨ What's Changed

Describe the changes you made in this PR.

✅ Checklist

  • ✅ I've tested this on a device/emulator
  • ✅ I've added tests where applicable
  • ✅ I've updated documentation (if needed)
  • ✅ This PR follows the CONTRIBUTING.md guidelines

This commit updates the following:
- Kotlin version to 2.2.10
- Android Gradle Plugin to version 8.13.0
- Compose BOM to version 2025.08.01
- JDK version to 24 in `gradle/libs.versions.toml`
- JVM target to 24 in `sample/build.gradle.kts` and `filepickerlibrary/build.gradle.kts`
This commit introduces a `configType` parameter to the `setSuccessResult` functions in `FilePickerResultHandler.kt`. This allows passing configuration type information within the result Intent.

- Added `CONFIG_TYPE` constant in `Const.kt`.
- Updated single and multiple URI `setSuccessResult` functions to include `configType` in the result Intent extras.
This commit updates the `PopupItem` composable to vertically center its content within the `Row`.

- Modified `Row` in `PopupItem.kt` to include `verticalAlignment = Alignment.CenterVertically`.
This commit introduces the following changes:

- Passes the specific config class name (`PickMediaConfig`, `DocumentFilePickerConfig`, `ImageCaptureConfig`, `VideoCaptureConfig`) in the `setSuccessResult` function calls within their respective activities. This allows for better identification of the originating picker type.
- In `PopUpActivity`:
    - Refactors the result handling from `FilePickerResultContracts.AnyFilePicker()` to simplify the conditions for setting success or canceled results.
    - Sets a specific error message "User dismissed the popup" when the dialog or bottom sheet is dismissed.
    - Extracts common UI logic for dialog and bottom sheet content into a new composable function `PopupContent`.
    - Replaces `Row` with `horizontalScroll` and `Column` with `verticalScroll` with `LazyRow` and `LazyColumn` respectively in the `ItemList` composable for improved performance with lists of items.
This commit introduces a private `parsePickerResult` function to consolidate the logic for parsing results from file picker activities. This function is now used by `PickMedia`, `PickDocumentFile`, and `FilePicker` contracts, reducing code duplication.

Additionally, the `AnyFilePicker` contract has been updated:
- It no longer stores `baseConfig` as a class property.
- It determines the configuration type from the intent extras (`Const.BundleExtras.CONFIG_TYPE`) in `parseResult` to correctly delegate to the appropriate specific file picker's `parseResult` method.
@ChochaNaresh ChochaNaresh merged commit 87c7829 into Dev Sep 11, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants