Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/news-android.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Development <david-dev@live.de>2014-09-01 11:40:15 +0400
committerDavid Development <david-dev@live.de>2014-09-01 11:40:15 +0400
commitdc18a69d50dc136f2f01b47b35b88333e34a762b (patch)
tree9ba4e8d187104ef4bd86ce0d02d67ccfde0d7bd0 /News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/services
parenta27fe350713b2fa7d651ce19cded78bcbe7e1b5e (diff)
Fix issue with color strip
Diffstat (limited to 'News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/services')
-rw-r--r--News-Android-App/src/main/java/de/luhmer/owncloudnewsreader/services/DownloadImagesService.java20
1 files changed, 11 insertions, 9 deletions
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 16500173..4d39aee4 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
@@ -47,6 +47,7 @@ import de.luhmer.owncloudnewsreader.R;
import de.luhmer.owncloudnewsreader.SettingsActivity;
import de.luhmer.owncloudnewsreader.async_tasks.GetImageAsyncTask;
import de.luhmer.owncloudnewsreader.database.DatabaseConnectionOrm;
+import de.luhmer.owncloudnewsreader.database.model.Feed;
import de.luhmer.owncloudnewsreader.database.model.RssItem;
import de.luhmer.owncloudnewsreader.helper.BitmapDrawableLruCache;
import de.luhmer.owncloudnewsreader.helper.FavIconHandler;
@@ -102,16 +103,17 @@ public class DownloadImagesService extends IntentService {
DatabaseConnectionOrm dbConn = new DatabaseConnectionOrm(this);
Notification notify = BuildNotification();
- SparseArray<String> linksFavIcons = dbConn.getUrlsToFavIcons();
- if(linksFavIcons.size() > 0)
- notificationManager.notify(NOTIFICATION_ID, notify);
+ //if(linksFavIcons.size() > 0)
+ //notificationManager.notify(NOTIFICATION_ID, notify);
- for(int i = 0; i < linksFavIcons.size(); i++) {
- int key = linksFavIcons.keyAt(i);
- String link = linksFavIcons.get(i);
- new FavIconHandler(this).PreCacheFavIcon(link, (long) key);
+ List<Feed> feedList = dbConn.getListOfFeeds();
+ FavIconHandler favIconHandler = new FavIconHandler(this);
+ for(Feed feed : feedList) {
+ favIconHandler.PreCacheFavIcon(feed);
}
+ feedList = null;
+ favIconHandler = null;
@@ -131,7 +133,7 @@ public class DownloadImagesService extends IntentService {
notificationManager.notify(NOTIFICATION_ID, notify);
for (String link : links)
- new GetImageAsyncTask(link, imgDownloadFinished, 999, FileUtils.getPathImageCache(this), this, null).execute();
+ new GetImageAsyncTask(link, imgDownloadFinished, 999, FileUtils.getPathImageCache(this), this).execute();
}
}
@@ -213,7 +215,7 @@ public class DownloadImagesService extends IntentService {
ImageDownloadFinished imgDownloadFinished = new ImageDownloadFinished() {
@Override
- public void DownloadFinished(int AsynkTaskId, Long feedId, Bitmap bitmap) {
+ public void DownloadFinished(long AsynkTaskId, Bitmap bitmap) {
count++;
// Sets the progress indicator to a max value, the