diff options
author | CalMWolfs <94038482+CalMWolfs@users.noreply.github.com> | 2023-10-26 09:28:42 +1100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-26 00:28:42 +0200 |
commit | cab7522665f1de2e72fd0bb785a7741e9b3278c1 (patch) | |
tree | b503e640a523b0d146a78ce54d1af9db34f476a4 /src/main/java/at/hannibal2/skyhanni/utils/ClipboardUtils.kt | |
parent | 7ec27bff0dc020c4a8e3174dbea2e89c9c910552 (diff) | |
download | skyhanni-cab7522665f1de2e72fd0bb785a7741e9b3278c1.tar.gz skyhanni-cab7522665f1de2e72fd0bb785a7741e9b3278c1.tar.bz2 skyhanni-cab7522665f1de2e72fd0bb785a7741e9b3278c1.zip |
Fix & Feature: Various sh words bugs and add some requested features (#602)
many shwords fixes #602
Diffstat (limited to 'src/main/java/at/hannibal2/skyhanni/utils/ClipboardUtils.kt')
-rw-r--r-- | src/main/java/at/hannibal2/skyhanni/utils/ClipboardUtils.kt | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/at/hannibal2/skyhanni/utils/ClipboardUtils.kt b/src/main/java/at/hannibal2/skyhanni/utils/ClipboardUtils.kt index fb47fc521..035259a1a 100644 --- a/src/main/java/at/hannibal2/skyhanni/utils/ClipboardUtils.kt +++ b/src/main/java/at/hannibal2/skyhanni/utils/ClipboardUtils.kt @@ -16,7 +16,7 @@ import kotlin.time.Duration.Companion.milliseconds object ClipboardUtils { private var lastClipboardAccessTime = SimpleTimeMark.farPast() - private fun canAccessClibpard(): Boolean { + private fun canAccessClipboard(): Boolean { val result = lastClipboardAccessTime.passedSince() > 10.milliseconds if (result) { lastClipboardAccessTime = SimpleTimeMark.now() @@ -26,7 +26,7 @@ object ClipboardUtils { private suspend fun getClipboard(): Clipboard? { val deferred = CompletableDeferred<Clipboard?>() - if (canAccessClibpard()) { + if (canAccessClipboard()) { deferred.complete(Toolkit.getDefaultToolkit().systemClipboard) } else { LorenzUtils.runDelayed(5.milliseconds) { |