Update the download snackbars to be more descriptive. https://redmine.stoutner.com...
[PrivacyBrowser.git] / app / src / main / java / com / stoutner / privacybrowser / asynctasks / SaveWebpageImage.java
index 27acbc5c6bcf015ebc447d6393d967c2cb7ba7e0..e44f5e6d028535425223f28bb632b01bff0e4ed4 100644 (file)
@@ -70,7 +70,7 @@ public class SaveWebpageImage extends AsyncTask<Void, Void, String> {
         }
 
         // Create a saving image snackbar.
-        savingImageSnackbar = Snackbar.make(nestedScrollWebView, activity.getString(R.string.processing_image) + "  " + filePathString, Snackbar.LENGTH_INDEFINITE);
+        savingImageSnackbar = Snackbar.make(nestedScrollWebView, activity.getString(R.string.processing_image) + "  " + nestedScrollWebView.getCurrentUrl(), Snackbar.LENGTH_INDEFINITE);
 
         // Display the saving image snackbar.
         savingImageSnackbar.show();
@@ -136,8 +136,8 @@ public class SaveWebpageImage extends AsyncTask<Void, Void, String> {
 
         // Display a file creation disposition snackbar.
         if (fileCreationDisposition.equals(SUCCESS)) {
-            // Display the file saved snackbar.
-            Snackbar.make(nestedScrollWebView, activity.getString(R.string.file_saved) + "  " + filePathString, Snackbar.LENGTH_SHORT).show();
+            // Display the image saved snackbar.
+            Snackbar.make(nestedScrollWebView, activity.getString(R.string.image_saved) + "  " + nestedScrollWebView.getCurrentUrl(), Snackbar.LENGTH_SHORT).show();
         } else {
             // Display the file saving error.
             Snackbar.make(nestedScrollWebView, activity.getString(R.string.error_saving_file) + "  " + fileCreationDisposition, Snackbar.LENGTH_INDEFINITE).show();