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")
|
TrayIconBuilder::with_id("tray")
|
||||||
.icon(app.default_window_icon().unwrap().clone())
|
.icon(app.default_window_icon().unwrap().clone())
|
||||||
.menu(&menu)
|
.menu(&menu)
|
||||||
.show_menu_on_left_click(true)
|
|
||||||
.on_tray_icon_event(|tray, event| match event {
|
.on_tray_icon_event(|tray, event| match event {
|
||||||
TrayIconEvent::Click {
|
TrayIconEvent::Click {
|
||||||
button: MouseButton::Left,
|
button: MouseButton::Left,
|
||||||
|
|||||||
@ -112,7 +112,7 @@ pub fn run() {
|
|||||||
})
|
})
|
||||||
.on_window_event(|window, event| match event {
|
.on_window_event(|window, event| match event {
|
||||||
tauri::WindowEvent::CloseRequested { api, .. } => {
|
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")]
|
#[cfg(target_os = "macos")]
|
||||||
window
|
window
|
||||||
.app_handle()
|
.app_handle()
|
||||||
@ -146,7 +146,7 @@ pub fn run() {
|
|||||||
log::error!("Failed to install extensions: {}", e);
|
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");
|
log::info!("Enabling system tray icon");
|
||||||
let _ = setup_tray(app);
|
let _ = setup_tray(app);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user