-
Notifications
You must be signed in to change notification settings - Fork 32
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
[WiP] Fixing Image Downloads #114
Conversation
I'd propose to ditch the DownloadManager completely and to download all images via InputStreams. Images needed in the app (eg. profile picture) can stay how they are atm. Images the user wants to download will be saved to disk (and in case of sharing they get shared from there). We can implement the determination of the filetype by comparing leading bytes (like I did), but using a PushbackInputStream, to take a look at the first bytes. |
Update title when showing contacts Update manage-tags and reports title
e07199c
to
572b5f5
Compare
Isssue no102 merged into #107 |
destinationFile.getAbsolutePath(), Toast.LENGTH_LONG).show(); | ||
} | ||
SaveImageTask saveTask = new SaveImageTask(); | ||
saveTask.setContext(context); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Constructor (Context context)
} | ||
} catch (IOException ignored) { | ||
} | ||
File destinationFile = new File(Environment.getExternalStorageDirectory() + "/Pictures/Diaspora/" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
= new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES), "dandelion");
Has this PR something usable, or complete rework anyway? Can be closed? |
@gsantner I'll have to revisit this once I have time again. |
This is done in a very hacky way. We should consider to rework image downloading/sharing etc. completely. (Also with ImageDownloadNotifications and ImageViewers in mind (#107))