Compare commits
4 Commits
66572e16ce
...
main
Author | SHA1 | Date | |
---|---|---|---|
ac11f91d79
|
|||
8e76e8d1e2
|
|||
3b6fc80578
|
|||
8c6fd139c8
|
402
Cargo.lock
generated
402
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -11,7 +11,7 @@ use lanspread_db::db::{Game, GameDB};
|
||||
use lanspread_mdns::{LANSPREAD_INSTANCE_NAME, LANSPREAD_SERVICE_TYPE, discover_service};
|
||||
use tauri::{AppHandle, Emitter as _, Manager};
|
||||
use tauri_plugin_shell::{ShellExt, process::Command};
|
||||
use tokio::sync::{Mutex, RwLock, mpsc::UnboundedSender};
|
||||
use tokio::sync::{RwLock, mpsc::UnboundedSender};
|
||||
|
||||
// Learn more about Tauri commands at https://tauri.app/develop/calling-rust/
|
||||
|
||||
@@ -19,7 +19,7 @@ struct LanSpreadState {
|
||||
server_addr: RwLock<Option<SocketAddr>>,
|
||||
client_ctrl: UnboundedSender<ClientCommand>,
|
||||
games: Arc<RwLock<GameDB>>,
|
||||
games_in_download: Arc<Mutex<HashSet<String>>>,
|
||||
games_in_download: Arc<RwLock<HashSet<String>>>,
|
||||
games_folder: Arc<RwLock<String>>,
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ fn request_games(state: tauri::State<LanSpreadState>) {
|
||||
#[tauri::command]
|
||||
fn install_game(id: String, state: tauri::State<LanSpreadState>) -> bool {
|
||||
let already_in_download = tauri::async_runtime::block_on(async {
|
||||
if state.inner().games_in_download.lock().await.contains(&id) {
|
||||
if state.inner().games_in_download.read().await.contains(&id) {
|
||||
log::warn!("Game is already downloading: {id}");
|
||||
return true;
|
||||
}
|
||||
@@ -356,7 +356,7 @@ pub fn run() {
|
||||
server_addr: RwLock::new(None),
|
||||
client_ctrl: tx_client_control,
|
||||
games: Arc::new(RwLock::new(GameDB::empty())),
|
||||
games_in_download: Arc::new(Mutex::new(HashSet::new())),
|
||||
games_in_download: Arc::new(RwLock::new(HashSet::new())),
|
||||
games_folder: Arc::new(RwLock::new(String::new())),
|
||||
};
|
||||
|
||||
@@ -416,7 +416,7 @@ pub fn run() {
|
||||
.state::<LanSpreadState>()
|
||||
.inner()
|
||||
.games_in_download
|
||||
.lock()
|
||||
.write()
|
||||
.await
|
||||
.insert(id.clone());
|
||||
|
||||
@@ -434,7 +434,7 @@ pub fn run() {
|
||||
.state::<LanSpreadState>()
|
||||
.inner()
|
||||
.games_in_download
|
||||
.lock()
|
||||
.write()
|
||||
.await
|
||||
.remove(&id.clone());
|
||||
|
||||
@@ -467,7 +467,7 @@ pub fn run() {
|
||||
.state::<LanSpreadState>()
|
||||
.inner()
|
||||
.games_in_download
|
||||
.lock()
|
||||
.write()
|
||||
.await
|
||||
.remove(&id.clone());
|
||||
},
|
||||
|
7
supply-chain/audits.toml
Normal file
7
supply-chain/audits.toml
Normal file
@@ -0,0 +1,7 @@
|
||||
|
||||
# cargo-vet audits file
|
||||
|
||||
[[audits.windows-link]]
|
||||
who = "ddidderr <ddidderr@paul.network>"
|
||||
criteria = "safe-to-deploy"
|
||||
delta = "0.1.1 -> 0.1.3"
|
2184
supply-chain/config.toml
Normal file
2184
supply-chain/config.toml
Normal file
File diff suppressed because it is too large
Load Diff
1982
supply-chain/imports.lock
Normal file
1982
supply-chain/imports.lock
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user