diff --git a/src-tauri/src/util/helpers.rs b/src-tauri/src/util/helpers.rs index 2fa51307..cc85009a 100644 --- a/src-tauri/src/util/helpers.rs +++ b/src-tauri/src/util/helpers.rs @@ -83,7 +83,9 @@ pub fn get_platform() -> &'static str { #[cfg(target_os = "windows")] pub fn is_windows_7() -> bool { - use windows::{Wdk::System::SystemServices::RtlGetVersion, Win32::System::SystemInformation::OSVERSIONINFOW}; + use windows::{ + Wdk::System::SystemServices::RtlGetVersion, Win32::System::SystemInformation::OSVERSIONINFOW, + }; let mut osvi = OSVERSIONINFOW::default(); osvi.dwOSVersionInfoSize = std::mem::size_of::() as u32; @@ -93,4 +95,4 @@ pub fn is_windows_7() -> bool { } osvi.dwMajorVersion == 6 && osvi.dwMinorVersion == 1 -} \ No newline at end of file +} diff --git a/src-tauri/src/util/notifications.rs b/src-tauri/src/util/notifications.rs index fc96cf06..d6370eca 100644 --- a/src-tauri/src/util/notifications.rs +++ b/src-tauri/src/util/notifications.rs @@ -56,7 +56,12 @@ pub fn send_notification(win: tauri::WebviewWindow, title: String, body: String, send_notification_internal(app, title, body, icon_path.clone()); } -fn send_notification_internal(app: &tauri::AppHandle, title: String, body: String, icon_path: String) { +fn send_notification_internal( + app: &tauri::AppHandle, + title: String, + body: String, + icon_path: String, +) { #[cfg(target_os = "windows")] { if !is_windows_7() { @@ -70,7 +75,12 @@ fn send_notification_internal(app: &tauri::AppHandle, title: String, body: Strin send_notification_internal_other(app, title, body, icon_path) } -fn send_notification_internal_other(app: &tauri::AppHandle, title: String, body: String, icon: String) { +fn send_notification_internal_other( + app: &tauri::AppHandle, + title: String, + body: String, + icon: String, +) { use tauri_plugin_notification::NotificationExt; app @@ -83,7 +93,12 @@ fn send_notification_internal_other(app: &tauri::AppHandle, title: String, body: .unwrap_or_default(); } -fn send_notification_internal_windows(app: &tauri::AppHandle, title: String, body: String, icon: String) { +fn send_notification_internal_windows( + app: &tauri::AppHandle, + title: String, + body: String, + icon: String, +) { use crate::util::window_helpers::ultrashow; use std::path::Path; use tauri_winrt_notification::{IconCrop, Toast};