Skip to content

Commit

Permalink
fix: clippy + fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
SpikeHD committed Oct 5, 2024
1 parent c51f9d9 commit 966850b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 2 additions & 0 deletions src-tauri/src/functionality/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ pub mod extension;
pub mod hotkeys;

pub mod keyboard;

#[cfg(target_os = "macos")]
pub mod menu;

#[cfg(feature = "rpc")]
Expand Down
5 changes: 3 additions & 2 deletions src-tauri/src/functionality/tray.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use include_flate::flate;
use tauri::{
image::Image,
menu::{MenuBuilder, MenuItemBuilder},
tray::{MouseButton, MouseButtonState, TrayIcon, TrayIconBuilder, TrayIconEvent},
tray::{MouseButton, MouseButtonState, TrayIconBuilder, TrayIconEvent},
AppHandle, Manager,
};

Expand Down Expand Up @@ -97,6 +97,7 @@ pub fn create_tray(app: &AppHandle) -> Result<(), tauri::Error> {
Ok(())
}

pub fn get_tray(app: &AppHandle) -> Option<TrayIcon> {
#[cfg(target_os = "macos")]
pub fn get_tray(app: &AppHandle) -> Option<tauri::tray::TrayIcon> {
app.tray_by_id("main")
}
6 changes: 2 additions & 4 deletions src-tauri/src/functionality/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ use crate::util::window_helpers::window_zoom_level;
#[cfg(feature = "blur")]
use crate::window::blur::apply_effect;

use super::{menu, tray};

// Minimize
#[tauri::command]
pub fn minimize(win: tauri::WebviewWindow) {
Expand Down Expand Up @@ -94,7 +92,7 @@ pub fn after_build(window: &tauri::WebviewWindow) {
enable_webrtc(window);
}

match tray::create_tray(app) {
match super::tray::create_tray(app) {
Ok(_) => {}
Err(e) => {
log!("Error creating tray icon: {:?}", e);
Expand Down Expand Up @@ -138,7 +136,7 @@ pub fn after_build(window: &tauri::WebviewWindow) {
}

#[cfg(target_os = "macos")]
menu::create_menubar(app).unwrap_or_default();
super::menu::create_menubar(app).unwrap_or_default();

window_zoom_level(window.clone(), None);
}
Expand Down

0 comments on commit 966850b

Please sign in to comment.