aboutsummaryrefslogtreecommitdiff
path: root/app/src/main/java/ml
diff options
context:
space:
mode:
Diffstat (limited to 'app/src/main/java/ml')
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/activities/ViewImageOrGifActivity.java2
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/asynctasks/SaveGIFToFile.java8
-rw-r--r--app/src/main/java/ml/docilealligator/infinityforreddit/fragments/ViewRedditGalleryImageOrGifFragment.java2
3 files changed, 6 insertions, 6 deletions
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<GifDrawable> 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<GifDrawable> 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,