1
0
mirror of https://github.com/tw93/Mole.git synced 2026-03-22 18:30:08 +00:00

🎨 Display effect optimization

This commit is contained in:
Tw93
2025-10-08 11:33:00 +08:00
parent 2edb1464ba
commit 79b1ea4091

19
mole
View File

@@ -356,16 +356,12 @@ show_main_menu() {
local selected="${1:-1}"
local full_draw="${2:-true}"
if [[ "$full_draw" == "true" ]]; then
clear_screen
echo ""
show_brand_banner
show_update_notification
echo ""
printf '\033[s'
else
printf '\033[u\033[0J'
fi
# Full redraw each time (prevents ghost menu items)
clear_screen
echo ""
show_brand_banner
show_update_notification
echo ""
show_menu_option 1 "Clean Mac - Remove junk files and optimize" "$([[ $selected -eq 1 ]] && echo true || echo false)"
show_menu_option 2 "Uninstall Apps - Remove applications completely" "$([[ $selected -eq 2 ]] && echo true || echo false)"
@@ -410,6 +406,9 @@ interactive_main_menu() {
first_draw=false
fi
# Drain any pending input to prevent touchpad scroll issues
drain_pending_input
local key=$(read_key)
[[ $? -ne 0 ]] && continue