diff --git a/News-Android-App/src/androidTest/java/screengrab/ScreenshotTest.java b/News-Android-App/src/androidTest/java/screengrab/ScreenshotTest.java index 84f230e2..67306fa6 100644 --- a/News-Android-App/src/androidTest/java/screengrab/ScreenshotTest.java +++ b/News-Android-App/src/androidTest/java/screengrab/ScreenshotTest.java @@ -60,7 +60,7 @@ public class ScreenshotTest { private NewsReaderListActivity activity; private NewsReaderListFragment nrlf; private NewsReaderDetailFragment nrdf; - private int itemPos = 5; + private int itemPos = 0; @Before public void setup() { diff --git a/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/async_tasks/GetImageThreaded.java b/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/async_tasks/GetImageThreaded.java index 8e27922e..999bd7c8 100644 --- a/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/async_tasks/GetImageThreaded.java +++ b/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/async_tasks/GetImageThreaded.java @@ -73,23 +73,23 @@ public class GetImageThreaded implements ImageLoadingListener @Override public void onLoadingFailed(String imageUri, View view, FailReason failReason) { - NotifyDownloadFinished(); + NotifyDownloadFinished(null); Log.d(TAG, "Failed to load file: " + imageUri); } @Override public void onLoadingComplete(String imageUri, View view, Bitmap loadedImage) { - NotifyDownloadFinished(); + NotifyDownloadFinished(loadedImage); } @Override public void onLoadingCancelled(String imageUri, View view) { - NotifyDownloadFinished(); + NotifyDownloadFinished(null); Log.d(TAG, "Cancelled: " + imageUri); } - private void NotifyDownloadFinished() { + private void NotifyDownloadFinished(Bitmap bitmap) { if(imageDownloadFinished != null) - imageDownloadFinished.DownloadFinished(ThreadId); + imageDownloadFinished.DownloadFinished(ThreadId, bitmap); } } diff --git a/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/helper/FavIconHandler.java b/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/helper/FavIconHandler.java index 5d69710b..efc47e0e 100644 --- a/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/helper/FavIconHandler.java +++ b/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/helper/FavIconHandler.java @@ -73,18 +73,11 @@ public class FavIconHandler { return; } - GetImageThreaded giAsync = new GetImageThreaded(feed.getFaviconUrl(), favIconDownloadFinished, feed.getId()); - - giAsync.start(); + new GetImageThreaded(feed.getFaviconUrl(), favIconDownloadFinished, feed.getId()).start(); } ImageDownloadFinished favIconDownloadFinished = new ImageDownloadFinished() { - @Override - public void DownloadFinished(long AsynkTaskId) { - DownloadFinished(AsynkTaskId, null); - } - @Override public void DownloadFinished(long AsynkTaskId, Bitmap bitmap) { if(bitmap != null) { diff --git a/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/helper/ImageDownloadFinished.java b/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/helper/ImageDownloadFinished.java index ec8a3b11..f570f34b 100644 --- a/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/helper/ImageDownloadFinished.java +++ b/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/helper/ImageDownloadFinished.java @@ -25,6 +25,5 @@ package de.luhmer.owncloudnewsreader.helper; import android.graphics.Bitmap; public interface ImageDownloadFinished { - void DownloadFinished(long AsynkTaskId); void DownloadFinished(long AsynkTaskId, Bitmap bitmap); } diff --git a/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/reader/InsertIntoDatabase.java b/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/reader/InsertIntoDatabase.java index baa3464d..793534d6 100644 --- a/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/reader/InsertIntoDatabase.java +++ b/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/reader/InsertIntoDatabase.java @@ -89,21 +89,6 @@ public class InsertIntoDatabase { break; } - /* - if(feeds.get(i).getLink().equals(oldFeed.getLink())) - { - if(!feeds.get(i).getFeedTitle().equals(oldFeed.getFeedTitle())) - { - oldFeed.setFeedTitle(feeds.get(i).getFeedTitle()); - } - //Set the avg color after sync again. - oldFeed.setAvgColour(oldFeeds.get(i).getAvgColour()); - dbConn.updateFeed(oldFeed); - - found = true; - break; - } - */ } if(!found) { diff --git a/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/services/DownloadImagesService.java b/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/services/DownloadImagesService.java index 6ad74501..6f3186ea 100644 --- a/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/services/DownloadImagesService.java +++ b/News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/services/DownloadImagesService.java @@ -191,12 +191,12 @@ public class DownloadImagesService extends IntentService { ImageDownloadFinished imgDownloadFinished = new ImageDownloadFinished() { - @Override - public void DownloadFinished(long ThreadId) { + @Override + public void DownloadFinished(long AsynkTaskId, Bitmap bitmap) { int count = maxCount - linksToImages.size(); if(maxCount == count) { - notificationManager.cancel(NOTIFICATION_ID); + notificationManager.cancel(NOTIFICATION_ID); //RemoveOldImages(); } else { mNotificationDownloadImages @@ -207,11 +207,6 @@ public class DownloadImagesService extends IntentService { StartNextDownloadInQueue(); } - } - - @Override - public void DownloadFinished(long AsynkTaskId, Bitmap bitmap) { - DownloadFinished(AsynkTaskId); } }; } diff --git a/Screengrabfile b/Screengrabfile index 45eebd82..ec3a4342 100644 --- a/Screengrabfile +++ b/Screengrabfile @@ -7,7 +7,7 @@ app_package_name 'de.luhmer.owncloudnewsreader' app_apk_path 'News-Android-App/build/outputs/apk/News-Android-App-debug-unaligned.apk' tests_apk_path 'News-Android-App/build/outputs/apk/News-Android-App-debug-androidTest-unaligned.apk' -locales ['en-US', 'fr-FR', 'it-IT'] +locales ['en-US', 'de-DE', 'fr-FR', 'it-IT'] # clear all previously generated screenshots in your local output directory before creating new ones clear_previous_screenshots true