diff options
author | daniel oeh <daniel.oeh@gmail.com> | 2013-02-12 01:01:20 +0100 |
---|---|---|
committer | daniel oeh <daniel.oeh@gmail.com> | 2013-02-12 01:01:20 +0100 |
commit | 71502d74ccdfcef97b871ba1aa03ffb09075abab (patch) | |
tree | 623164b325184a646d6254c1231347aee7aa3e10 /src/de | |
parent | 235c07393857cd8f87f1f09b43248caf96bb328e (diff) | |
download | AntennaPod-71502d74ccdfcef97b871ba1aa03ffb09075abab.zip |
newline-character wasn't appended correctly
Diffstat (limited to 'src/de')
-rw-r--r-- | src/de/danoeh/antennapod/service/download/DownloadService.java | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/de/danoeh/antennapod/service/download/DownloadService.java b/src/de/danoeh/antennapod/service/download/DownloadService.java index 278736db8..59f0a5b97 100644 --- a/src/de/danoeh/antennapod/service/download/DownloadService.java +++ b/src/de/danoeh/antennapod/service/download/DownloadService.java @@ -261,27 +261,30 @@ public class DownloadService extends Service { if (notificationBuilder != null) { - StringBuilder bigText = null; - for (Downloader downloader : downloads) { + StringBuilder bigText = new StringBuilder(""); + for (int i = 0; i < downloads.size(); i++) { + Downloader downloader = downloads.get(i); if (downloader.getStatus() != null) { - if (bigText == null) { - bigText = new StringBuilder(""); - } FeedFile f = downloader.getStatus().getFeedFile(); if (f.getClass() == Feed.class) { Feed feed = (Feed) f; if (feed.getTitle() != null) { - bigText.append("\u2022 " + feed.getTitle() - + "\n"); + if (i > 0) { + bigText.append("\n"); + } + bigText.append("\u2022 " + feed.getTitle()); } } else if (f.getClass() == FeedMedia.class) { FeedMedia media = (FeedMedia) f; if (media.getItem().getTitle() != null) { + if (i > 0) { + bigText.append("\n"); + } bigText.append("\u2022 " + media.getItem().getTitle() + " (" + downloader.getStatus() - .getProgressPercent() + "%)\n"); + .getProgressPercent() + "%)"); } } } |