mirror of
https://github.com/spacedriveapp/spacedrive.git
synced 2026-10-19 07:35:26 -04:00
fix desktop
This commit is contained in:
1 parent
4f29fcf0a8
commit
a4b84d31cc
4 files changed
+16
-12
No files matched your search
Generated
+1
-1
@@ -6411,7 +6411,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "rspc"
|
||||
version = "0.1.4"
|
||||
source = "git+https://github.com/oscartbeaumont/rspc?rev=745f0b210f6d268a4cef5d43b595e88d99ac269f#745f0b210f6d268a4cef5d43b595e88d99ac269f"
|
||||
source = "git+https://github.com/oscartbeaumont/rspc?rev=e40eb883c69c315d67c8a0ed7e4a010cd26c5b6a#e40eb883c69c315d67c8a0ed7e4a010cd26c5b6a"
|
||||
dependencies = [
|
||||
"futures",
|
||||
"futures-channel",
|
||||
|
||||
+1
-1
@@ -45,5 +45,5 @@ if-watch = { git = "https://github.com/oscartbeaumont/if-watch", rev = "410e8e1d
|
||||
|
||||
mdns-sd = { git = "https://github.com/oscartbeaumont/mdns-sd", rev = "45515a98e9e408c102871abaa5a9bff3bee0cbe8" } # TODO: Do upstream PR
|
||||
|
||||
rspc = { git = "https://github.com/oscartbeaumont/rspc", rev = "745f0b210f6d268a4cef5d43b595e88d99ac269f" }
|
||||
rspc = { git = "https://github.com/oscartbeaumont/rspc", rev = "e40eb883c69c315d67c8a0ed7e4a010cd26c5b6a" }
|
||||
httpz = { git = "https://github.com/oscartbeaumont/httpz", rev = "a5185f2ed2fdefeb2f582dce38a692a1bf76d1d6" }
|
||||
@@ -249,16 +249,17 @@ pub(crate) fn mount_invalidate() -> AlphaRouter<Ctx> {
|
||||
// Given human reaction time of ~250 milli this should be a good ballance.
|
||||
_ = tokio::time::sleep(Duration::from_millis(200)) => {
|
||||
let x = buf.drain().map(|(_k, v)| v).collect::<Vec<_>>();
|
||||
match tx.send(x) {
|
||||
Ok(_) => {},
|
||||
// All receivers are shutdown means that all clients are disconnected.
|
||||
Err(_) => {
|
||||
debug!("Shutting down invalidation manager! This is normal if all clients disconnects.");
|
||||
manager_thread_active.swap(false, Ordering::Relaxed);
|
||||
break;
|
||||
if x.len() > 0 {
|
||||
match tx.send(x) {
|
||||
Ok(_) => {},
|
||||
// All receivers are shutdown means that all clients are disconnected.
|
||||
Err(_) => {
|
||||
debug!("Shutting down invalidation manager! This is normal if all clients disconnects.");
|
||||
manager_thread_active.swap(false, Ordering::Relaxed);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,7 +13,10 @@ use crate::{api::Ctx, library::Library};
|
||||
|
||||
/// Can wrap a query argument to require it to contain a `library_id` and provide helpers for working with libraries.
|
||||
#[derive(Clone, Serialize, Deserialize, Type)]
|
||||
pub(crate) struct LibraryArgs<T>(pub Uuid, pub T);
|
||||
pub(crate) struct LibraryArgs<T> {
|
||||
library_id: Uuid,
|
||||
arg: T,
|
||||
}
|
||||
|
||||
pub(crate) struct LibraryArgsLike;
|
||||
impl MwArgMapper for LibraryArgsLike {
|
||||
@@ -23,7 +26,7 @@ impl MwArgMapper for LibraryArgsLike {
|
||||
fn map<T: Serialize + DeserializeOwned + Type + 'static>(
|
||||
arg: Self::Input<T>,
|
||||
) -> (T, Self::State) {
|
||||
(arg.1, arg.0)
|
||||
(arg.arg, arg.library_id)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user