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:
parent
3478fe0624
commit
172e9df5e3
1 changed files with 4 additions and 2 deletions
|
@ -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…
Reference in a new issue