fix: failed tests
This commit is contained in:
parent
a85ffa270e
commit
4a4423ed6b
@ -219,7 +219,6 @@ pub fn setup_tray(app: &App) -> tauri::Result<TrayIcon> {
|
||||
TrayIconBuilder::with_id("tray")
|
||||
.icon(app.default_window_icon().unwrap().clone())
|
||||
.menu(&menu)
|
||||
.show_menu_on_left_click(true)
|
||||
.on_tray_icon_event(|tray, event| match event {
|
||||
TrayIconEvent::Click {
|
||||
button: MouseButton::Left,
|
||||
|
||||
@ -112,7 +112,7 @@ pub fn run() {
|
||||
})
|
||||
.on_window_event(|window, event| match event {
|
||||
tauri::WindowEvent::CloseRequested { api, .. } => {
|
||||
if env!("ENABLE_SYSTEM_TRAY_ICON") == "true" {
|
||||
if option_env!("ENABLE_SYSTEM_TRAY_ICON").unwrap_or("false") == "true" {
|
||||
#[cfg(target_os = "macos")]
|
||||
window
|
||||
.app_handle()
|
||||
@ -146,7 +146,7 @@ pub fn run() {
|
||||
log::error!("Failed to install extensions: {}", e);
|
||||
}
|
||||
|
||||
if env!("ENABLE_SYSTEM_TRAY_ICON") == "true" {
|
||||
if option_env!("ENABLE_SYSTEM_TRAY_ICON").unwrap_or("false") == "true" {
|
||||
log::info!("Enabling system tray icon");
|
||||
let _ = setup_tray(app);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user