@@ -269,6 +269,18 @@ public abstract class AbstractInterfaceView<I : InterfacesInventory, T : Interfa
269
269
decoratingJob.set(null )
270
270
transformingJob.set(null )
271
271
272
+ // Queue up any unfinished transforms back up!
273
+ queuedTransforms + = pendingTransforms
274
+ pendingTransforms.clear()
275
+ val oldLazy = pendingNonBlockingTransforms
276
+ pendingNonBlockingTransforms = ConcurrentLinkedQueue ()
277
+ queuedTransforms + = oldLazy
278
+
279
+ // Clear up all the state that might be half-finished!
280
+ lazyElements.clear()
281
+ queueAllTriggers.set(false )
282
+ debouncedRender.set(false )
283
+
272
284
// Test if a background menu should be opened
273
285
if (reason in REOPEN_REASONS && ! player.isDead) {
274
286
InterfacesListeners .INSTANCE .reopenInventory(player)
@@ -524,7 +536,7 @@ public abstract class AbstractInterfaceView<I : InterfacesInventory, T : Interfa
524
536
525
537
if (instantTransforms.isEmpty() || lazyTransforms.isEmpty()) {
526
538
// If either category is empty we run everything immediately
527
- pendingTransforms.addAll(transforms )
539
+ pendingTransforms.addAll(newTransforms )
528
540
529
541
// If only the instant transforms are empty, we render first!
530
542
if (instantTransforms.isEmpty() && renderIfEmpty) {
@@ -587,7 +599,7 @@ public abstract class AbstractInterfaceView<I : InterfacesInventory, T : Interfa
587
599
// After we complete a render we add any lazy transforms to the pending
588
600
// list which may cause us to keep rendering even after the re-render
589
601
val oldLazy = pendingNonBlockingTransforms
590
- pendingNonBlockingTransforms = ConcurrentLinkedQueue < AppliedTransform < P >> ()
602
+ pendingNonBlockingTransforms = ConcurrentLinkedQueue ()
591
603
pendingTransforms + = oldLazy
592
604
}
593
605
}
0 commit comments