🐛 Fix PlatformFile child resolution for non-web#475
Conversation
# Conflicts: # sample/shared/src/nonWebMain/kotlin/io/github/vinceglb/filekit/sample/shared/ui/screens/debug/DebugScreen.nonWeb.kt
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fe73924895
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| */ | ||
| public fun PlatformFile(base: PlatformFile, child: String): PlatformFile = | ||
| PlatformFile(base.toKotlinxIoPath() / child) | ||
| public expect fun PlatformFile(base: PlatformFile, child: String): PlatformFile |
There was a problem hiding this comment.
Provide Android actual for PlatformFile(base, child)
The new expect fun PlatformFile(base, child) is declared in nonWebMain, but Android depends on nonWebMain (see build-logic/convention/ConfigureKotlinMultiplatform.kt where androidMain depends on nonWebMain) and there is no Android actual implementation. As a result, Android builds will fail with an “expected/actual mismatch” when compiling the Android target, and the / operator on PlatformFile can’t be resolved for Android. This breaks ./gradlew assemble for Android consumers until an Android actual is added.
Useful? React with 👍 / 👎.
| val folderPicker = rememberDirectoryPickerLauncher(directory = null) { folder -> | ||
| scope.launch { | ||
| folder?.let { | ||
| debugPlatformTest(folder) | ||
| } |
There was a problem hiding this comment.
Restore button state after directory picker completes
The debug screen now launches the directory picker, but the callback only runs debugPlatformTest and never resets buttonState or updates files. Since onPrimaryButtonClick still sets buttonState to Loading, the UI remains stuck in the loading state after any pick/cancel, and the results list stays empty. This is a regression from the previous file picker behavior and makes the debug UI appear broken after one use.
Useful? React with 👍 / 👎.
No description provided.