Export episodes & fix background auth - #9
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 773e213966
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
|
||
| const destination = new File(Paths.cache, sanitize_export_filename(trimmed_title)); | ||
|
|
||
| await source.copy(destination, { overwrite: true }); |
There was a problem hiding this comment.
Remove the existing cached file before copying
On a second export of the same episode title before the OS evicts the cache, the destination already exists and File.copy fails rather than replacing it; the File API does not accept the extra { overwrite: true } argument, so it is ignored. This makes repeat exports—and exports of different episodes sharing a title—show an error instead of opening the share sheet. Delete the destination when it exists before copying it.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
File.copy in expo-file-system 56.0.8 already takes { overwrite: true } (RelocationOptions). iOS and Android both delete the destination first when that flag is set, so a second export of the same title replaces the cache file instead of failing.
No need to delete-then-copy here.
Hey @manton,
This adds the ability to export an episode you have recorded on both iOS and Android.
On the episode screen a new option
Exportlives in the...menu. It opens the native share sheet and you can select where you'd like to put it.That's it for export.
Note
You will have to
bun installand then run thebun x expo prebuild --cleancommand so it picks up all the packages — just make sure the version number is correct etc. Should all just work.One minor other tweak is to allow you to auth via the deep link when we've got the auth session browser going with the
Sign in with Micro.blog— I did the same for the MB App also so it flows nicer and people aren't stuck when they click on the link in the email.— Vincent