|
|
|
@ -125,23 +125,19 @@ public class WatchNotifier { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (show) { |
|
|
|
|
// "33 new posts, 3 quoting you"
|
|
|
|
|
String title = newPostsCount + " new post" + (newPostsCount != 1 ? "s" : ""); |
|
|
|
|
if (newQuotesCount > 0) { |
|
|
|
|
title += ", " + newQuotesCount + " quoting you"; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// "234 new posts in DPT"
|
|
|
|
|
// "234 new posts in 5 threads"
|
|
|
|
|
String descriptor; |
|
|
|
|
String tickerText = title + " in "; |
|
|
|
|
|
|
|
|
|
if (pins.size() == 1) { |
|
|
|
|
descriptor = pins.get(0).loadable.title; |
|
|
|
|
tickerText += pins.get(0).loadable.title; |
|
|
|
|
} else { |
|
|
|
|
descriptor = pins.size() + " thread" + (pins.size() != 1 ? "s" : ""); |
|
|
|
|
tickerText += pins.size() + " thread" + (pins.size() != 1 ? "s" : ""); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
String content = newPostsCount + " new post" + (newPostsCount != 1 ? "s" : "") + " in " + descriptor; |
|
|
|
|
|
|
|
|
|
Collections.sort(posts, new PostAgeComparer()); |
|
|
|
|
|
|
|
|
|
List<CharSequence> lines = new ArrayList<CharSequence>(); |
|
|
|
@ -160,7 +156,7 @@ public class WatchNotifier { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
showNotification(content, title, content, Integer.toString(newPostsCount), lines, makeSound); |
|
|
|
|
showNotification(tickerText, title, tickerText, Integer.toString(newPostsCount), lines, makeSound); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|