Double notifications with some apps, affects all ni() functions except pcount

Example for a single Gmail notification:

  1. ni(pcount, com.google.android.gm) = 1
  2. ni(count) = 2
  3. ni(0, pkg) = com.google.android.gm
  4. ni(1, pkg) = com.google.android.gm

This seems to appear only with Gmail and Telegram X, and cancelling the single notification brings the notification counts to 0.

Yes this is a problem with a hub created by Android for some app notifications like you said and I think that include others like google clock and whatsapp and others.The first is the notif that said to you that you have a notif of this app, if you cancel this you cancel all the notif of this app, if you cancel the second or third you cancel only this notif, and the hub and the others remain.