Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use java.nio.file APIs in the download functionality. #3311

Merged
merged 2 commits into from
Mar 17, 2023

Conversation

Isira-Seneviratne
Copy link
Collaborator

@Isira-Seneviratne Isira-Seneviratne commented Mar 16, 2023

getAsync(context, url) { bitmap ->
saveImage(context, bitmap, Uri.fromFile(File(path)))
@Suppress("NewApi") // The Path class is desugared.
saveImage(context, bitmap, path.toFile().toUri())
Copy link
Member

Choose a reason for hiding this comment

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

I guess we can use Path#toAndroidUri here too.

@Bnyro Bnyro merged commit e91809e into libre-tube:master Mar 17, 2023
@Isira-Seneviratne Isira-Seneviratne deleted the Java_NIO_downloads branch March 17, 2023 14:21
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