diff --git a/ATTRIBUTION.md b/ATTRIBUTION.md index f84a9acd5d..def30cafb8 100644 --- a/ATTRIBUTION.md +++ b/ATTRIBUTION.md @@ -14,7 +14,6 @@ FairEmail uses: * [ShortcutBadger](https://github.com/leolin310148/ShortcutBadger). Copyright 2014 Leo Lin. [Apache license 2.0](https://github.com/leolin310148/ShortcutBadger/blob/master/LICENSE). * [Bugsnag exception reporter for Android](https://github.com/bugsnag/bugsnag-android). Copyright (c) 2012 Bugsnag. [MIT License](https://github.com/bugsnag/bugsnag-android/blob/master/LICENSE.txt). * [biweekly](https://github.com/mangstadt/biweekly). Copyright (c) 2013-2018, Michael Angstadt. [BSD 2-Clause](https://github.com/mangstadt/biweekly/blob/master/LICENSE). -* [PhotoView](https://github.com/chrisbanes/PhotoView). Copyright 2018 Chris Banes. [Apache License 2.0](https://github.com/chrisbanes/PhotoView/blob/master/LICENSE). * [ReLinker](https://github.com/KeepSafe/ReLinker). Copyright 2015 - 2016 KeepSafe Software, Inc. [Apache License 2.0](https://github.com/KeepSafe/ReLinker/blob/master/LICENSE). * [Markwon](https://github.com/noties/Markwon). Copyright 2019 Dimitry Ivanov. [Apache License 2.0](https://github.com/noties/Markwon/blob/master/LICENSE). * [Color Picker](https://github.com/QuadFlask/colorpicker). Copyright 2014-2017 QuadFlask. [Apache License 2.0](https://github.com/QuadFlask/colorpicker#user-content-license). diff --git a/app/build.gradle b/app/build.gradle index 4cfc620563..cc4ecabc40 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -386,9 +386,6 @@ dependencies { exclude group: 'com.fasterxml.jackson.core', module: 'jackson-core' } - // https://github.com/chrisbanes/PhotoView - implementation "com.github.chrisbanes:PhotoView:$photoview_version" - // https://github.com/KeepSafe/ReLinker // https://mvnrepository.com/artifact/com.getkeepsafe.relinker/relinker?repo=jcenter implementation "com.getkeepsafe.relinker:relinker:$relinker_version" diff --git a/app/src/main/assets/ATTRIBUTION.md b/app/src/main/assets/ATTRIBUTION.md index f84a9acd5d..def30cafb8 100644 --- a/app/src/main/assets/ATTRIBUTION.md +++ b/app/src/main/assets/ATTRIBUTION.md @@ -14,7 +14,6 @@ FairEmail uses: * [ShortcutBadger](https://github.com/leolin310148/ShortcutBadger). Copyright 2014 Leo Lin. [Apache license 2.0](https://github.com/leolin310148/ShortcutBadger/blob/master/LICENSE). * [Bugsnag exception reporter for Android](https://github.com/bugsnag/bugsnag-android). Copyright (c) 2012 Bugsnag. [MIT License](https://github.com/bugsnag/bugsnag-android/blob/master/LICENSE.txt). * [biweekly](https://github.com/mangstadt/biweekly). Copyright (c) 2013-2018, Michael Angstadt. [BSD 2-Clause](https://github.com/mangstadt/biweekly/blob/master/LICENSE). -* [PhotoView](https://github.com/chrisbanes/PhotoView). Copyright 2018 Chris Banes. [Apache License 2.0](https://github.com/chrisbanes/PhotoView/blob/master/LICENSE). * [ReLinker](https://github.com/KeepSafe/ReLinker). Copyright 2015 - 2016 KeepSafe Software, Inc. [Apache License 2.0](https://github.com/KeepSafe/ReLinker/blob/master/LICENSE). * [Markwon](https://github.com/noties/Markwon). Copyright 2019 Dimitry Ivanov. [Apache License 2.0](https://github.com/noties/Markwon/blob/master/LICENSE). * [Color Picker](https://github.com/QuadFlask/colorpicker). Copyright 2014-2017 QuadFlask. [Apache License 2.0](https://github.com/QuadFlask/colorpicker#user-content-license). diff --git a/app/src/main/java/eu/faircode/email/AdapterMessage.java b/app/src/main/java/eu/faircode/email/AdapterMessage.java index 2befe9b1a0..3a91a18b19 100644 --- a/app/src/main/java/eu/faircode/email/AdapterMessage.java +++ b/app/src/main/java/eu/faircode/email/AdapterMessage.java @@ -138,7 +138,6 @@ import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; import androidx.recyclerview.widget.StaggeredGridLayoutManager; -import com.github.chrisbanes.photoview.PhotoView; import com.google.android.material.floatingactionbutton.FloatingActionButton; import com.google.android.material.snackbar.Snackbar; @@ -3794,7 +3793,7 @@ public class AdapterMessage extends RecyclerView.Adapter 0) { String source = image[0].getSource(); - if (source != null) { + if (!TextUtils.isEmpty(source)) { onOpenImage(message.id, source); return true; } @@ -3866,7 +3865,7 @@ public class AdapterMessage extends RecyclerView.Adapter() { @Override protected EntityAttachment onExecute(Context context, Bundle args) { @@ -3889,9 +3888,11 @@ public class AdapterMessage extends RecyclerView.Adapter() { @Override protected File onExecute(Context context, Bundle args) throws IOException { @@ -3920,11 +3921,9 @@ public class AdapterMessage extends RecyclerView.Adapter() { - @Override - protected Drawable onExecute(Context context, Bundle args) throws Throwable { - long id = args.getLong("id"); - String source = args.getString("source"); - int zoom = args.getInt("zoom"); - return ImageHelper.decodeImage(context, id, source, true, zoom, null); - } - - @Override - protected void onExecuted(Bundle args, Drawable drawable) { - pv.setImageDrawable(drawable); - if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) { - if (drawable instanceof AnimatedImageDrawable) - ((AnimatedImageDrawable) drawable).start(); - } - } - - @Override - protected void onException(Bundle args, Throwable ex) { - Log.unexpectedError(getParentFragmentManager(), ex); - } - }.execute(this, getArguments(), "view:image"); - - final Dialog dialog = new Dialog(getContext(), android.R.style.Theme_Black_NoTitleBar_Fullscreen); - dialog.setContentView(pv); - - return dialog; - } - } - public static class FragmentDialogJunk extends FragmentDialogBase { @NonNull @Override