Skip to content

Commit 1d266fd

Browse files
committed
MSC4352 clear main.rs
Signed-off-by: Igor Somov <[email protected]>
1 parent 28acbaa commit 1d266fd

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ tracing-subscriber = "0.3.16"
6262
unicode-segmentation = "^1.7"
6363
unicode-width = "0.1.10"
6464
url = {version = "^2.2.2", features = ["serde"]}
65-
percent-encoding = "^2.1"
6665
edit = "0.1.4"
6766
humansize = "2.0.0"
6867
linkify = "0.10.0"

src/main.rs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -767,10 +767,16 @@ impl Application {
767767
// Generate permalink
768768
let permalink = make_https_permalink_with_base(&base_url, &matrix_to_uri);
769769

770-
// Clipboard functionality temporarily disabled due to build issues
771-
// TODO: Re-enable when modalkit clipboard feature is properly configured
770+
// Try to copy to clipboard if available
771+
#[cfg(feature = "desktop")]
772+
{
773+
use modalkit::clipboard::ClipboardProvider;
774+
if let Ok(mut clipboard) = modalkit::clipboard::ClipboardProvider::new() {
775+
let _ = clipboard.set_contents(permalink.clone());
776+
}
777+
}
772778

773-
let msg = format!("Permalink: {}", permalink);
779+
let msg = format!("Permalink: {} (copied to clipboard)", permalink);
774780
Ok(Some(msg.into()))
775781
}
776782

0 commit comments

Comments
 (0)