Skip to content

Export episodes & fix background auth - #9

Open
vincentritter wants to merge 3 commits into
mainfrom
feature/export-episode
Open

Export episodes & fix background auth#9
vincentritter wants to merge 3 commits into
mainfrom
feature/export-episode

Conversation

@vincentritter

Copy link
Copy Markdown
Collaborator

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 Export lives in the ... menu. It opens the native share sheet and you can select where you'd like to put it.

export share-sheet

That's it for export.

Note

You will have to bun install and then run the bun x expo prebuild --clean command 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

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread src/lib/episode_export.js

const destination = new File(Paths.cache, sanitize_export_filename(trimmed_title));

await source.copy(destination, { overwrite: true });

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

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.

1 participant