mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-26 01:36:55 +00:00
Handle HTML images without source
This commit is contained in:
parent
12b801711f
commit
f207a7deb9
1 changed files with 6 additions and 3 deletions
|
@ -1078,12 +1078,15 @@ public class FragmentMessage extends FragmentEx {
|
||||||
image.delete();
|
image.delete();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create unique file name
|
|
||||||
File file = new File(dir, id + "_" + source.hashCode());
|
|
||||||
|
|
||||||
InputStream is = null;
|
InputStream is = null;
|
||||||
FileOutputStream os = null;
|
FileOutputStream os = null;
|
||||||
try {
|
try {
|
||||||
|
if (source == null)
|
||||||
|
throw new IllegalArgumentException("Html.ImageGetter.getDrawable(source == null)");
|
||||||
|
|
||||||
|
// Create unique file name
|
||||||
|
File file = new File(dir, id + "_" + source.hashCode());
|
||||||
|
|
||||||
// Get input stream
|
// Get input stream
|
||||||
if (file.exists()) {
|
if (file.exists()) {
|
||||||
Log.i(Helper.TAG, "Using cached " + file);
|
Log.i(Helper.TAG, "Using cached " + file);
|
||||||
|
|
Loading…
Reference in a new issue