From cf5d5051fd84c60cf1017d108bd9a165e59e8b8e Mon Sep 17 00:00:00 2001 From: Randall Winkhart Date: Sat, 7 Jun 2025 21:00:39 -0400 Subject: [PATCH] Fix compilation for Android --- core/clipClearProcessDROID.go | 5 +++-- core/copyDROID.go | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/core/clipClearProcessDROID.go b/core/clipClearProcessDROID.go index cfc1294..a58a69a 100644 --- a/core/clipClearProcessDROID.go +++ b/core/clipClearProcessDROID.go @@ -12,7 +12,7 @@ import ( // clipClearProcess clears the clipboard after 30 seconds if the clipboard contents have not changed. // assignedContents can be omitted to clear the clipboard immediately and unconditionally. -func clipClearProcess(assignedContents string) { +func clipClearProcess(assignedContents string) error { clearClipboard := func() { clipboard.Write(clipboard.FmtText, []byte("")) back.Exit(0) @@ -21,7 +21,7 @@ func clipClearProcess(assignedContents string) { // if assignedContents is empty, clear the clipboard immediately and unconditionally if assignedContents == "" { clearClipboard() - return + return nil } // wait 30 seconds before checking clipboard contents @@ -32,4 +32,5 @@ func clipClearProcess(assignedContents string) { if assignedContents == strings.TrimRight(string(newContents), "\r\n") { clearClipboard() } + return nil } diff --git a/core/copyDROID.go b/core/copyDROID.go index 93a839c..94b9b5e 100644 --- a/core/copyDROID.go +++ b/core/copyDROID.go @@ -7,10 +7,10 @@ import ( ) // copyString copies a string to the clipboard. -func copyString(continuous bool, copySubject string) { +func copyString(continuous bool, copySubject string) error { clipboard.Write(clipboard.FmtText, []byte(copySubject)) - if !continuous { LaunchClipClearProcess(copySubject) } + return nil }