Skip to content

Commit

Permalink
fix: fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
SpikeHD committed Dec 17, 2024
1 parent 37ee8b2 commit 0d982c2
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 5 deletions.
6 changes: 4 additions & 2 deletions src-tauri/src/util/helpers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::<OSVERSIONINFOW>() as u32;
Expand All @@ -93,4 +95,4 @@ pub fn is_windows_7() -> bool {
}

osvi.dwMajorVersion == 6 && osvi.dwMinorVersion == 1
}
}
21 changes: 18 additions & 3 deletions src-tauri/src/util/notifications.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand All @@ -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
Expand All @@ -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};
Expand Down

0 comments on commit 0d982c2

Please sign in to comment.