Mercurial > cgi-bin > hgweb.cgi > ClipMan
diff src/name/blackcap/clipman/PasteboardQueue.kt @ 5:d832c7b2bfd0
Clean out some deadwood.
author | David Barts <n5jrn@me.com> |
---|---|
date | Sat, 18 Jan 2020 12:55:26 -0800 |
parents | 6fb94eae32fa |
children | 88703ca72fc3 |
line wrap: on
line diff
--- a/src/name/blackcap/clipman/PasteboardQueue.kt Sat Jan 18 12:31:53 2020 -0800 +++ b/src/name/blackcap/clipman/PasteboardQueue.kt Sat Jan 18 12:55:26 2020 -0800 @@ -32,7 +32,7 @@ get() { return _maxSize } @Synchronized set(value) { _maxSize = value - truncate(false) + truncate() } /** @@ -53,13 +53,13 @@ } } queue.addLast(item) - truncate(true) + truncate() } - private fun truncate(forceValidate: Boolean) { + private fun truncate() { if (_maxSize > 0) { var size = queue.size - var dirty = forceValidate + var dirty = false while (size > _maxSize) { var extra = queue.removeFirst().component inSwingThread { parent.remove(extra) }