mirror of
https://github.com/AntennaPod/AntennaPod.git
synced 2025-01-12 00:47:17 +01:00
Don't show notification entry if title is null
This commit is contained in:
parent
cfb7c15646
commit
f182862182
@ -263,22 +263,26 @@ public class DownloadService extends Service {
|
|||||||
|
|
||||||
StringBuilder bigText = null;
|
StringBuilder bigText = null;
|
||||||
for (Downloader downloader : downloads) {
|
for (Downloader downloader : downloads) {
|
||||||
if (bigText == null) {
|
|
||||||
bigText = new StringBuilder();
|
|
||||||
} else {
|
|
||||||
bigText.append("\n");
|
|
||||||
}
|
|
||||||
if (downloader.getStatus() != null) {
|
if (downloader.getStatus() != null) {
|
||||||
|
if (bigText == null) {
|
||||||
|
bigText = new StringBuilder("");
|
||||||
|
}
|
||||||
FeedFile f = downloader.getStatus().getFeedFile();
|
FeedFile f = downloader.getStatus().getFeedFile();
|
||||||
if (f.getClass() == Feed.class) {
|
if (f.getClass() == Feed.class) {
|
||||||
bigText.append("\u2022 " + ((Feed) f).getTitle());
|
Feed feed = (Feed) f;
|
||||||
|
if (feed.getTitle() != null) {
|
||||||
|
bigText.append("\u2022 " + feed.getTitle()
|
||||||
|
+ "\n");
|
||||||
|
}
|
||||||
} else if (f.getClass() == FeedMedia.class) {
|
} else if (f.getClass() == FeedMedia.class) {
|
||||||
FeedMedia media = (FeedMedia) f;
|
FeedMedia media = (FeedMedia) f;
|
||||||
bigText.append("\u2022 "
|
if (media.getItem().getTitle() != null) {
|
||||||
+ media.getItem().getTitle()
|
bigText.append("\u2022 "
|
||||||
+ " ("
|
+ media.getItem().getTitle()
|
||||||
+ downloader.getStatus()
|
+ " ("
|
||||||
.getProgressPercent() + "%)");
|
+ downloader.getStatus()
|
||||||
|
.getProgressPercent() + "%)\n");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user