Revert "synchronizedList must be in a synchronized block when iterating"
This reverts commit 1f12fc5e91.
This commit is contained in:
@@ -70,6 +70,7 @@ public class ItemRepo {
|
|||||||
|
|
||||||
public IAEItemStack getReferenceItem(int idx) {
|
public IAEItemStack getReferenceItem(int idx) {
|
||||||
idx += this.src.getCurrentScroll() * this.rowSize;
|
idx += this.src.getCurrentScroll() * this.rowSize;
|
||||||
|
|
||||||
if (idx >= this.view.size()) {
|
if (idx >= this.view.size()) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -218,8 +219,8 @@ public class ItemRepo {
|
|||||||
|
|
||||||
return view;
|
return view;
|
||||||
}).thenAcceptAsync(view -> {
|
}).thenAcceptAsync(view -> {
|
||||||
this.updated = true;
|
this.view.clear();
|
||||||
this.asyncUpdatedView.addAll(view);
|
this.view.addAll(view);
|
||||||
}).thenRunAsync(() -> {
|
}).thenRunAsync(() -> {
|
||||||
this.searchTask = null; // Prevent redundant cancellation
|
this.searchTask = null; // Prevent redundant cancellation
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user