From a5359b62013a4bb956af95895ae12e0a7124b9dc Mon Sep 17 00:00:00 2001 From: Your Name Date: Wed, 18 Dec 2024 23:25:49 +0300 Subject: [PATCH] close notification after press button; visible success of update --- src/updatenotif.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/updatenotif.py b/src/updatenotif.py index 5ea1b9d..50bbedd 100644 --- a/src/updatenotif.py +++ b/src/updatenotif.py @@ -19,7 +19,7 @@ async def git_notifications_update(): logger.info('updates not found, nothing to do') else: os.system( - f"termux-notification --title 'ub4tg: update avalaible!' --content 'For apply tap button Get update and restart bot\nChanges:\n{commits}' --button1 'Get update' --button1-action 'cd {cwd}; git pull'") + f"termux-notification -i ub4tgupd --title 'ub4tg: update avalaible!' --content 'For apply tap button Get update and restart bot\nChanges:\n{commits}' --button1 'Get update' --button1-action 'termux-notification-remove ub4tgupd; cd {cwd}; git pull && termux-toast 'ub4tg updated, now restart it for apply update' || termux-toast 'ub4tg update failed'") else: os.system( "termux-toast '[ub4tg]: failed fetching update, maybe connection error, check console log for more info'")