From d278bd873debaf4bdaf9f5183b013286383d3e71 Mon Sep 17 00:00:00 2001 From: Docile-Alligator <25734209+Docile-Alligator@users.noreply.github.com> Date: Sun, 2 Jun 2024 10:05:28 -0400 Subject: Version 7.2.4-beta1. --- .../infinityforreddit/activities/ViewImageOrGifActivity.java | 2 +- .../infinityforreddit/asynctasks/SaveGIFToFile.java | 8 ++++---- .../fragments/ViewRedditGalleryImageOrGifFragment.java | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'app/src') diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewImageOrGifActivity.java b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewImageOrGifActivity.java index 895d0b77..88668712 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewImageOrGifActivity.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewImageOrGifActivity.java @@ -418,7 +418,7 @@ public class ViewImageOrGifActivity extends AppCompatActivity implements SetAsWa public boolean onResourceReady(GifDrawable resource, Object model, Target target, DataSource dataSource, boolean isFirstResource) { if (getExternalCacheDir() != null) { SaveGIFToFile.saveGifToFile(mExecutor, handler, resource, getExternalCacheDir().getPath(), mImageFileName, - new SaveGIFToFile.SaveGIFToFileAsyncTaskListener() { + new SaveGIFToFile.SaveGIFToFileListener() { @Override public void saveSuccess(File imageFile) { Uri uri = FileProvider.getUriForFile(ViewImageOrGifActivity.this, diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/asynctasks/SaveGIFToFile.java b/app/src/main/java/ml/docilealligator/infinityforreddit/asynctasks/SaveGIFToFile.java index e4b61364..a1fb16e5 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/asynctasks/SaveGIFToFile.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/asynctasks/SaveGIFToFile.java @@ -15,7 +15,7 @@ public class SaveGIFToFile { public static void saveGifToFile(Executor executor, Handler handler, GifDrawable resource, String cacheDirPath, String fileName, - SaveGIFToFileAsyncTaskListener saveImageToFileAsyncTaskListener) { + SaveGIFToFileListener saveImageToFileListener) { executor.execute(() -> { try { File imageFile = new File(cacheDirPath, fileName); @@ -26,14 +26,14 @@ public class SaveGIFToFile { outputStream.write(bytes, 0, bytes.length); outputStream.close(); - handler.post(() -> saveImageToFileAsyncTaskListener.saveSuccess(imageFile)); + handler.post(() -> saveImageToFileListener.saveSuccess(imageFile)); } catch (IOException e) { - handler.post(saveImageToFileAsyncTaskListener::saveFailed); + handler.post(saveImageToFileListener::saveFailed); } }); } - public interface SaveGIFToFileAsyncTaskListener { + public interface SaveGIFToFileListener { void saveSuccess(File imageFile); void saveFailed(); } diff --git a/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewRedditGalleryImageOrGifFragment.java b/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewRedditGalleryImageOrGifFragment.java index 9e3f72d1..cb60df38 100644 --- a/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewRedditGalleryImageOrGifFragment.java +++ b/app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewRedditGalleryImageOrGifFragment.java @@ -437,7 +437,7 @@ public class ViewRedditGalleryImageOrGifFragment extends Fragment { public boolean onResourceReady(GifDrawable resource, Object model, Target target, DataSource dataSource, boolean isFirstResource) { if (activity.getExternalCacheDir() != null) { SaveGIFToFile.saveGifToFile(mExecutor, new Handler(), resource, activity.getExternalCacheDir().getPath(), media.fileName, - new SaveGIFToFile.SaveGIFToFileAsyncTaskListener() { + new SaveGIFToFile.SaveGIFToFileListener() { @Override public void saveSuccess(File imageFile) { Uri uri = FileProvider.getUriForFile(activity, -- cgit v1.2.3