Skip showing zero accounts

pull/192/head
M66B 4 years ago
parent 3478fe0624
commit 172e9df5e3

@ -929,8 +929,6 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
NotificationCompat.Builder builder =
new NotificationCompat.Builder(this, "service")
.setSmallIcon(R.drawable.baseline_compare_arrows_white_24)
.setContentTitle(getResources().getQuantityString(
R.plurals.title_notification_synchronizing, lastAccounts, lastAccounts))
.setContentIntent(piWhy)
.setAutoCancel(false)
.setShowWhen(false)
@ -940,6 +938,10 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
.setVisibility(NotificationCompat.VISIBILITY_SECRET)
.setLocalOnly(true);
if (lastAccounts > 0)
builder.setContentTitle(getResources().getQuantityString(
R.plurals.title_notification_synchronizing, lastAccounts, lastAccounts));
if (lastOperations > 0)
builder.setContentText(getResources().getQuantityString(
R.plurals.title_notification_operations, lastOperations, lastOperations));

Loading…
Cancel
Save