feat: integrate event tracking for hotkey actions, history management, and settings updates

This commit is contained in:
PandaDEV 2024-12-23 14:34:21 +10:00
parent 3824f24be4
commit f44be512fe
No known key found for this signature in database
GPG key ID: 13EFF9BAF70EE75C
8 changed files with 149 additions and 36 deletions

View file

@ -1,3 +1,4 @@
use tauri_plugin_aptabase::EventTracker;
use crate::utils::commands::center_window_on_current_monitor;
use global_hotkey::{
hotkey::{Code, HotKey, Modifiers},
@ -142,4 +143,8 @@ fn handle_hotkey_event(app_handle: &AppHandle) {
center_window_on_current_monitor(&window);
}
let _ = app_handle.track_event("hotkey_triggered", Some(serde_json::json!({
"action": if window.is_visible().unwrap() { "hide" } else { "show" }
})));
}