display message on details page

This commit is contained in:
Athou
2013-08-13 12:15:30 +02:00
parent 06a996cd81
commit 21b0176a49
5 changed files with 19 additions and 6 deletions

View File

@@ -101,8 +101,9 @@ public class FeedRefreshUpdater {
boolean ok = true;
Feed feed = context.getFeed();
List<FeedEntry> entries = context.getEntries();
if (entries.isEmpty() == false) {
if (entries.isEmpty()) {
feed.setMessage("Feed has no entries");
} else {
List<String> lastEntries = cache.getLastEntries(feed);
List<String> currentEntries = Lists.newArrayList();
@@ -125,6 +126,10 @@ public class FeedRefreshUpdater {
}
cache.setLastEntries(feed, currentEntries);
if (subscriptions == null) {
feed.setMessage("No new entries found");
}
if (CollectionUtils.isNotEmpty(subscriptions)) {
List<User> users = Lists.newArrayList();
for (FeedSubscription sub : subscriptions) {

View File

@@ -124,7 +124,7 @@ public class FeedRefreshWorker {
disabledUntil = FeedUtils.buildDisabledUntil(feed.getLastEntryDate(), feed.getAverageEntryInterval(), disabledUntil);
}
feed.setErrorCount(0);
feed.setMessage(null);
feed.setMessage(e.getMessage());
feed.setDisabledUntil(disabledUntil);
taskGiver.giveBack(feed);