# HG changeset patch # User David Barts # Date 1736727971 28800 # Node ID d35b8478e0895a673b2dbbbdb5e90415a3b7b7f9 # Parent a8b04aa874e3658bd318af0de469a96d4122c1ac Remove redundant event dispatch thread task submissions. diff -r a8b04aa874e3 -r d35b8478e089 src/name/blackcap/clipman/PasteboardQueue.kt --- a/src/name/blackcap/clipman/PasteboardQueue.kt Sun Jan 12 12:13:20 2025 -0800 +++ b/src/name/blackcap/clipman/PasteboardQueue.kt Sun Jan 12 16:26:11 2025 -0800 @@ -55,10 +55,8 @@ * @param item QueueItem to add */ @Synchronized fun add(item: QueueItem) { - inSwingThread { - parent.add(item.view.contents) - validate() - } + parent.add(item.view.contents) + validate() queue.addLast(item) truncate() } @@ -149,18 +147,16 @@ var dirty = false while (size > _maxSize) { var extra = queue.removeFirst().view - inSwingThread { - if (extra.searchable.selected) { - Application.anyRequired.disable() - Application.styledRequired.disable() - } - parent.remove(extra.contents) + if (extra.searchable.selected) { + Application.anyRequired.disable() + Application.styledRequired.disable() } + parent.remove(extra.contents) dirty = true size -= 1 } if (dirty) { - inSwingThread { validate() } + validate() } } }