Fix: Stable update info polling (#872)
* adjusted sleep between polls to always sleep at least 2s * fixed tooltip formatting when no updates available --------- Co-authored-by: Mara <mara.dawn69@gmail.com>
This commit is contained in:
@@ -13,9 +13,13 @@ has_param() {
|
||||
|
||||
wait_for_process_to_finish() {
|
||||
local process_name="$1"
|
||||
while pgrep -a "$process_name" >/dev/null; do
|
||||
sleep 0.1
|
||||
local pid
|
||||
|
||||
while pid=$(pgrep -x "$process_name"); do
|
||||
wait "$pid" 2>/dev/null || true
|
||||
done
|
||||
|
||||
sleep 2
|
||||
}
|
||||
|
||||
check_arch_updates() {
|
||||
|
||||
@@ -34,7 +34,7 @@ const processUpdateCount = (updateCount: string): string => {
|
||||
|
||||
const processUpdateTooltip = (updateTooltip: string, updateCount: Variable<string>): string => {
|
||||
const defaultTooltip = updateCount.get() + ' updates available';
|
||||
if (!extendedTooltip.get()) return defaultTooltip;
|
||||
if (!extendedTooltip.get() || !updateTooltip) return defaultTooltip;
|
||||
return defaultTooltip + '\n\n' + updateTooltip;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user