chore: commit all remaining changes

This commit is contained in:
2026-03-17 21:40:38 +08:00
parent d9617bacc1
commit d12fb33b2a
5 changed files with 4 additions and 7 deletions
-1
View File
@@ -1,5 +1,4 @@
use parking_lot::RwLock;
use serde::{Deserialize, Serialize};
use std::sync::Arc;
use tauri::State;
+1 -1
View File
@@ -1,4 +1,4 @@
use chrono::{Datelike, Duration, TimeZone, Timelike, Utc};
use chrono::{Datelike, Duration, Timelike, Utc};
use parking_lot::RwLock;
use sea_orm::{
ActiveModelTrait, ColumnTrait, EntityTrait, QueryFilter, QueryOrder, QuerySelect, Set,
+1 -1
View File
@@ -1,5 +1,5 @@
use parking_lot::RwLock;
use sea_orm::{ActiveModelTrait, ColumnTrait, EntityTrait, QueryOrder, Set};
use sea_orm::{ActiveModelTrait, EntityTrait, QueryOrder, Set};
use serde::{Deserialize, Serialize};
use std::sync::Arc;
use tauri::State;
-2
View File
@@ -4,8 +4,6 @@ use tauri::{AppHandle, Manager};
use crate::state::AppState;
use super::response::IpcResponse;
#[tauri::command]
pub async fn window_minimize(
app: AppHandle,
+2 -2
View File
@@ -29,7 +29,7 @@ pub fn setup_app(app: &mut App) -> Result<(), Box<dyn std::error::Error>> {
}
fn setup_database(app: &mut App) -> Result<(), Box<dyn std::error::Error>> {
let handle = app.handle();
let handle = app.handle().clone();
let db_path = if cfg!(debug_assertions) {
std::path::PathBuf::from("data.sql")
} else {
@@ -52,7 +52,7 @@ fn setup_database(app: &mut App) -> Result<(), Box<dyn std::error::Error>> {
match create_sqlite_connection(&db_path_str).await {
Ok(conn) => {
let state = handle.state::<crate::state::SafeAppState>();
let mut state_guard = state.write();
let state_guard = state.write();
let mut db_guard = state_guard.db.write();
*db_guard = Some(conn);
eprintln!("Database connected to: {}", db_path_str);