Pamac tray - Incorrect number of packages to update
Hi.
After resuming my notebook, Pamac's tray found new updates. But every time it notified me, the count of packages to update was increasing (5, 10, 15, 20, 25... etc). Because establishing a network connection takes some time, there is a possibility that after resume Pamac is trying to check updates few times. Or maybe some timeout events were stored for later execution.
I see in the code (https://gitlab.manjaro.org/applications/pamac/-/blob/master/src/tray.vala) that counting is done via subprocess as an async callback. If the check_updates() is called few times and async responses are delayed, the counter would be increasing. Zeroing updates_nb
inside a callback should solve the issue (last response wins). But maybe some locking mechanism would be better (one notification instead of N).