Bug 1241810 - Review follow-up: Rename CheckAction.notify() to CheckAction.showNotification(). r=me

MozReview-Commit-ID: EIRYnna6yf9

--HG--
extra : rebase_source : 5fa1e41087c5dfdb090adfdeca829d22665d590c
This commit is contained in:
Sebastian Kaspari 2016-03-23 15:56:24 +01:00
Родитель c121890328
Коммит 9fdb905a6e
1 изменённых файлов: 6 добавлений и 6 удалений

Просмотреть файл

@ -84,7 +84,7 @@ public class CheckAction extends BaseAction {
cursor.close();
}
notify(updatedFeeds);
showNotification(updatedFeeds);
}
private FeedFetcher.FeedResponse checkFeedForUpdates(FeedSubscription subscription) {
@ -107,22 +107,22 @@ public class CheckAction extends BaseAction {
return null;
}
private void notify(List<Feed> updatedFeeds) {
private void showNotification(List<Feed> updatedFeeds) {
final int feedCount = updatedFeeds.size();
if (feedCount == 0) {
return;
}
if (feedCount == 1) {
notifySingle(updatedFeeds.get(0));
showNotificationForSingleUpdate(updatedFeeds.get(0));
} else {
notifyMultiple(updatedFeeds);
showNotificationForMultipleUpdates(updatedFeeds);
}
Telemetry.sendUIEvent(TelemetryContract.Event.SHOW, TelemetryContract.Method.NOTIFICATION, "content_update");
}
private void notifySingle(Feed feed) {
private void showNotificationForSingleUpdate(Feed feed) {
final String date = DateFormat.getMediumDateFormat(context).format(new Date(feed.getLastItem().getTimestamp()));
NotificationCompat.BigTextStyle style = new NotificationCompat.BigTextStyle()
@ -151,7 +151,7 @@ public class CheckAction extends BaseAction {
NotificationManagerCompat.from(context).notify(R.id.websiteContentNotification, notification);
}
private void notifyMultiple(List<Feed> feeds) {
private void showNotificationForMultipleUpdates(List<Feed> feeds) {
final ArrayList<String> urls = new ArrayList<>();
final NotificationCompat.InboxStyle inboxStyle = new NotificationCompat.InboxStyle();