Skip to content

Commit

Permalink
Improve the logic of automatic paste
Browse files Browse the repository at this point in the history
  • Loading branch information
LeeeSe committed May 31, 2024
1 parent d10ab21 commit 2f25968
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 13 deletions.
12 changes: 6 additions & 6 deletions Cargo.lock

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

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
[package]
name = "MessAuto"
version = "0.8.4"
version = "0.8.5"
edition = "2021"
description = "Automatic extraction of Email and SMS verification code for Mac platform."

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
sys-locale = "0.3.1"
tray-icon = "0.13.0"
tao = "0.27.1"
tray-icon = "0.14.1"
tao = "0.28.0"
rust-i18n = "3.0.1"
serde_json = "1.0.107"
serde = "1.0.188"
Expand Down
12 changes: 8 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -453,11 +453,15 @@ pub fn messages_thread() {
let config = read_config();
if config.float_window {
let _child = open_app(real_captcha, t!("imessage").to_string());
} else if config.auto_paste && !config.float_window {
} else if !config.float_window {
ctx.set_text(&real_captcha).unwrap();
match paste_script() {
Ok(_) => info!("{}", t!("paste-verification-code")),
Err(e) => error!("{}: {:?}", t!("error-paste-verification-code"), e),
if config.auto_paste {
match paste_script() {
Ok(_) => info!("{}", t!("paste-verification-code")),
Err(e) => {
error!("{}: {:?}", t!("error-paste-verification-code"), e)
}
}
}
if config.auto_return {
match return_script() {
Expand Down

0 comments on commit 2f25968

Please sign in to comment.