mirror of
https://github.com/0PandaDEV/Qopy.git
synced 2025-04-21 13:14:04 +02:00
fix: unused listener for live update
This commit is contained in:
parent
46fe44071d
commit
e5597050a9
1 changed files with 2 additions and 3 deletions
|
@ -111,7 +111,6 @@ pub fn setup<R: Runtime>(app: &AppHandle<R>) {
|
||||||
HistoryItem::new(ContentType::Image, file_path, None),
|
HistoryItem::new(ContentType::Image, file_path, None),
|
||||||
).await;
|
).await;
|
||||||
}
|
}
|
||||||
let _ = app.emit("plugin:clipboard://image-changed", ());
|
|
||||||
} else if available_types.files {
|
} else if available_types.files {
|
||||||
println!("Handling files change");
|
println!("Handling files change");
|
||||||
if let Ok(files) = clipboard.read_files() {
|
if let Ok(files) = clipboard.read_files() {
|
||||||
|
@ -121,7 +120,6 @@ pub fn setup<R: Runtime>(app: &AppHandle<R>) {
|
||||||
HistoryItem::new(ContentType::File, files_str, None),
|
HistoryItem::new(ContentType::File, files_str, None),
|
||||||
).await;
|
).await;
|
||||||
}
|
}
|
||||||
let _ = app.emit("plugin:clipboard://files-changed", ());
|
|
||||||
} else if available_types.text {
|
} else if available_types.text {
|
||||||
println!("Handling text change");
|
println!("Handling text change");
|
||||||
if let Ok(text) = clipboard.read_text() {
|
if let Ok(text) = clipboard.read_text() {
|
||||||
|
@ -149,7 +147,6 @@ pub fn setup<R: Runtime>(app: &AppHandle<R>) {
|
||||||
).await;
|
).await;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let _ = app.emit("plugin:clipboard://text-changed", ());
|
|
||||||
} else {
|
} else {
|
||||||
println!("Unknown clipboard content type");
|
println!("Unknown clipboard content type");
|
||||||
}
|
}
|
||||||
|
@ -158,6 +155,8 @@ pub fn setup<R: Runtime>(app: &AppHandle<R>) {
|
||||||
println!("Failed to get database pool: {}", e);
|
println!("Failed to get database pool: {}", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let _ = app.emit("clipboard-content-updated", ());
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue