1
0
Fork 0
mirror of https://github.com/M66B/FairEmail.git synced 2025-01-03 13:44:40 +00:00

Skip showing zero accounts

This commit is contained in:
M66B 2021-01-26 19:59:40 +01:00
parent 3478fe0624
commit 172e9df5e3

View file

@ -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));