Skip to content

Commit 508ff58

Browse files
Merge pull request #24 from DeveloperRejaul/dev
Dev
2 parents 2f65d03 + f42d0ef commit 508ff58

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎desktop/package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "time-snap",
33
"private": true,
4-
"version": "1.1.2",
4+
"version": "1.1.3",
55
"type": "module",
66
"scripts": {
77
"dev": "vite",

‎desktop/src-tauri/src/lib.rs‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,13 @@ use rdev::{listen, Event, EventType};
55
use std::io::Cursor;
66
use std::sync::atomic::{AtomicBool, Ordering};
77
use std::sync::OnceLock;
8-
use scrap::{Capturer, Display};
9-
use xcap::Monitor;
108

119
static IS_ALREADY_CALL: OnceLock<AtomicBool> = OnceLock::new();
1210

1311

1412
#[cfg(any(target_os = "macos", target_os = "windows"))]
15-
pub async fn get_screenshot_impl() -> Result<Vec<String>, String> {
13+
async fn get_screenshot_impl() -> Result<Vec<String>, String> {
14+
use xcap::Monitor;
1615
// Get all monitors
1716
let monitors = Monitor::all().map_err(|e| e.to_string())?;
1817
if monitors.is_empty() {
@@ -42,6 +41,7 @@ pub async fn get_screenshot_impl() -> Result<Vec<String>, String> {
4241

4342
#[cfg(target_os = "linux")]
4443
async fn get_screenshot_impl() -> Result<Vec<String>, String> {
44+
use scrap::{Capturer, Display};
4545
let displays = Display::all().map_err(|e| e.to_string())?;
4646
if displays.is_empty() {
4747
return Err("No displays found".into());

0 commit comments

Comments
 (0)