diff --git a/src-tauri/src/functionality/configure/linux.rs b/src-tauri/src/functionality/configure/linux.rs index 3bd72ab4..00f93fe0 100644 --- a/src-tauri/src/functionality/configure/linux.rs +++ b/src-tauri/src/functionality/configure/linux.rs @@ -2,7 +2,7 @@ use std::path::PathBuf; use tauri::path::BaseDirectory; use tauri::Manager; -use webkit2gtk::{PermissionRequestExt, SettingsExt, WebViewExt, WebContextExt}; +use webkit2gtk::{PermissionRequestExt, SettingsExt, WebContextExt, WebViewExt}; use crate::gpu::disable_hardware_accel_linux; use crate::log; @@ -50,4 +50,4 @@ pub fn enable_webrtc(window: &tauri::WebviewWindow) { }); }) .unwrap_or_else(|_| log!("Failed to enable WebRTC")); -} \ No newline at end of file +} diff --git a/src-tauri/src/functionality/configure/macos.rs b/src-tauri/src/functionality/configure/macos.rs index f4509343..8589df29 100644 --- a/src-tauri/src/functionality/configure/macos.rs +++ b/src-tauri/src/functionality/configure/macos.rs @@ -1,3 +1,3 @@ pub fn configure(window: &tauri::WebviewWindow) { super::menu::create_menubar(window.app_handle()).unwrap_or_default(); -} \ No newline at end of file +} diff --git a/src-tauri/src/functionality/configure/mod.rs b/src-tauri/src/functionality/configure/mod.rs index f248041d..41a558e7 100644 --- a/src-tauri/src/functionality/configure/mod.rs +++ b/src-tauri/src/functionality/configure/mod.rs @@ -10,7 +10,16 @@ mod linux; use tauri::Manager; use tauri_plugin_window_state::{StateFlags, WindowExt}; -use crate::{config::get_config, injection::plugin::load_plugins, log, util::{color::start_os_accent_subscriber, window_helpers::{set_user_agent, ultrashow, window_zoom_level}}, window::blur::apply_effect}; +use crate::{ + config::get_config, + injection::plugin::load_plugins, + log, + util::{ + color::start_os_accent_subscriber, + window_helpers::{set_user_agent, ultrashow, window_zoom_level}, + }, + window::blur::apply_effect, +}; use super::{extension::load_extensions, rpc::start_rpc_server, tray::create_tray}; @@ -27,14 +36,15 @@ pub fn configure(window: &tauri::WebviewWindow) { if !config.multi_instance.unwrap_or(false) { log!("Multi-instance disabled, registering single instance plugin..."); - handle.plugin(tauri_plugin_single_instance::init( - move |app, _argv, _cwd| { - if let Some(win) = app.get_webview_window("main") { - ultrashow(win); - } - }, - )) - .unwrap_or_else(|_| log!("Failed to register single instance plugin")); + handle + .plugin(tauri_plugin_single_instance::init( + move |app, _argv, _cwd| { + if let Some(win) = app.get_webview_window("main") { + ultrashow(win); + } + }, + )) + .unwrap_or_else(|_| log!("Failed to register single instance plugin")); } // If safemode is enabled, stop here @@ -99,4 +109,4 @@ pub fn configure(window: &tauri::WebviewWindow) { linux::configure(window); window_zoom_level(window.clone(), None); -} \ No newline at end of file +} diff --git a/src-tauri/src/functionality/configure/windows.rs b/src-tauri/src/functionality/configure/windows.rs index 503e27b6..109cf5eb 100644 --- a/src-tauri/src/functionality/configure/windows.rs +++ b/src-tauri/src/functionality/configure/windows.rs @@ -1,4 +1,3 @@ - use std::fs; use std::path::PathBuf; use tauri::path::BaseDirectory; @@ -37,4 +36,4 @@ pub fn install_extension(window: &tauri::WebviewWindow) { // Refresh the page to ensure extensions are loaded window.eval("window.location.reload();").unwrap_or_default(); -} \ No newline at end of file +} diff --git a/src-tauri/src/functionality/window.rs b/src-tauri/src/functionality/window.rs index 08a5cfad..99ad14ac 100644 --- a/src-tauri/src/functionality/window.rs +++ b/src-tauri/src/functionality/window.rs @@ -5,8 +5,6 @@ use tauri_plugin_window_state::{AppHandleExt, StateFlags}; use crate::config::get_config; use crate::log; - - // Minimize #[tauri::command] pub fn minimize(win: tauri::WebviewWindow) { @@ -59,4 +57,3 @@ pub fn setup_autostart(app: &mut tauri::App) { autostart_manager.is_enabled().unwrap_or_default() ); } - diff --git a/src-tauri/src/main.rs b/src-tauri/src/main.rs index dfc5c3c1..94cb0824 100644 --- a/src-tauri/src/main.rs +++ b/src-tauri/src/main.rs @@ -24,10 +24,7 @@ use util::{ }; use crate::{ - functionality::{ - window::setup_autostart, - configure::configure - }, + functionality::{configure::configure, window::setup_autostart}, util::logger, };