mirror of https://github.com/M66B/NetGuard.git
Show allowed/blocked/hosts count only if there is something to count
This commit is contained in:
parent
df2c62aca0
commit
989303efc6
|
@ -1458,13 +1458,16 @@ public class SinkholeService extends VpnService implements SharedPreferences.OnS
|
|||
.setPriority(Notification.PRIORITY_MIN);
|
||||
}
|
||||
|
||||
NotificationCompat.BigTextStyle notification = new NotificationCompat.BigTextStyle(builder);
|
||||
notification.bigText(getString(R.string.msg_started));
|
||||
if (Util.isPlayStoreInstall(this))
|
||||
notification.setSummaryText(getString(R.string.msg_packages, allowed, blocked));
|
||||
else
|
||||
notification.setSummaryText(getString(R.string.msg_hosts, allowed, blocked, hosts));
|
||||
return notification.build();
|
||||
if (allowed > 0 || blocked > 0 || hosts > 0) {
|
||||
NotificationCompat.BigTextStyle notification = new NotificationCompat.BigTextStyle(builder);
|
||||
notification.bigText(getString(R.string.msg_started));
|
||||
if (Util.isPlayStoreInstall(this))
|
||||
notification.setSummaryText(getString(R.string.msg_packages, allowed, blocked));
|
||||
else
|
||||
notification.setSummaryText(getString(R.string.msg_hosts, allowed, blocked, hosts));
|
||||
return notification.build();
|
||||
} else
|
||||
return builder.build();
|
||||
}
|
||||
|
||||
private void updateEnforcingNotification(int allowed, int total) {
|
||||
|
|
Loading…
Reference in New Issue