From b95c079a286030623a61fde2886041ccbc13e130 Mon Sep 17 00:00:00 2001 From: cketti Date: Fri, 13 Sep 2013 00:10:33 +0200 Subject: [PATCH] Clean up code --- .../fsck/k9/controller/MessagingController.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/com/fsck/k9/controller/MessagingController.java b/src/com/fsck/k9/controller/MessagingController.java index ff4e4fb68..d4fe4355d 100644 --- a/src/com/fsck/k9/controller/MessagingController.java +++ b/src/com/fsck/k9/controller/MessagingController.java @@ -3352,13 +3352,13 @@ public class MessagingController implements Runnable { builder.setSmallIcon(R.drawable.ic_notify_check_mail); builder.setWhen(System.currentTimeMillis()); builder.setOngoing(true); - if(!TextUtils.isEmpty(account.getDescription())) { - builder.setTicker(mApplication.getString(R.string.notification_bg_send_ticker, - account.getDescription())); - }else { - builder.setTicker(mApplication.getString(R.string.notification_bg_send_ticker, - account.getEmail())); - } + + String accountDescription = account.getDescription(); + String accountName = (TextUtils.isEmpty(accountDescription)) ? + account.getEmail() : accountDescription; + + builder.setTicker(mApplication.getString(R.string.notification_bg_send_ticker, + accountName)); builder.setContentTitle(mApplication.getString(R.string.notification_bg_send_title)); builder.setContentText(account.getDescription());