Skip to content

Commit

Permalink
Bump version to 0.8.3 in Cargo.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
LeeeSe committed Apr 29, 2024
1 parent c8edefb commit 55f7f26
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "MessAuto"
version = "0.8.2"
version = "0.8.3"
edition = "2021"
description = "Automatic extraction of Email and SMS verification code for Mac platform."

Expand Down
2 changes: 1 addition & 1 deletion locales/zh-CN.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,4 @@ recover-clipboard: 不占用剪贴板
recover-clipboard-disabled: 占用剪贴板
recover-clipboard-enabled: 不再占用剪贴板
unable-to-recover-clipboard: 无法恢复剪贴板,可能剪贴板为空
old-clpb-contents: 暂存当前剪贴板内容
old-clpb-contents: 恢复旧剪贴板内容
3 changes: 2 additions & 1 deletion src/float_window.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std::fs::File;
use std::{fs::File, thread::sleep, time::Duration};

use arboard::Clipboard;
use i_slint_backend_winit::winit::platform::macos::WindowBuilderExtMacOS;
Expand Down Expand Up @@ -98,6 +98,7 @@ pub fn main(code: &str, from_app: &str) -> Result<(), slint::PlatformError> {
info!("{}", t!("press-enter"));
}
if config.recover_clipboard {
sleep(Duration::from_secs(2));
recover_clipboard_contents(old_clpb_contents);
}
ui.hide().unwrap();
Expand Down
6 changes: 4 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -462,12 +462,14 @@ pub fn messages_thread() {
info!("{}", t!("press-enter"));
}
if config.recover_clipboard {
sleep(Duration::from_secs(2)); // wait applescript to finish
recover_clipboard_contents(old_clipboard_contents);
}
}
}
sleep(Duration::from_secs(5));
}
sleep(Duration::from_secs(5));
sleep(Duration::from_secs(1)); // check db change every second
}
});
}
Expand Down Expand Up @@ -700,7 +702,7 @@ async fn async_watch<P: AsRef<Path>>(path: P) -> notify::Result<()> {
info!("{}", t!("press-enter"));
}
if config.recover_clipboard {
async_std::task::sleep(Duration::from_secs(1)).await; //wait for pasted
async_std::task::sleep(Duration::from_secs(2)).await; //wait for pasted
recover_clipboard_contents(old_clpb_contents);
}
}
Expand Down

0 comments on commit 55f7f26

Please sign in to comment.