mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-04-09 20:42:28 +08:00
Fixed two critical issues: 1. **Blocking Issue - restart_app return type error** - Fixed compilation error where restart_app() didn't return a value - Used async spawn with 100ms delay to allow response before restart - Prevents "unreachable code" compiler error 2. **High Priority - Import SQL doesn't refresh AppSettings cache** - Added reload_settings() function to refresh in-memory settings cache - Integrated into import flow to ensure imported settings take effect - Prevents imported settings being overwritten by stale memory cache - Affects: language, config directories, auto-launch, custom endpoints Changes: - src/commands/settings.rs: Async delayed restart with proper return value - src/settings.rs: New reload_settings() to sync memory cache from DB - src/commands/import_export.rs: Call reload_settings() after SQL import Verified: cargo clippy --lib and pnpm typecheck both pass