* make old items replaceable in-place. makes the new values visually blend in
*/
private void renumberItems() {
- final List<Item> list = items.getValue();
+ renumberItems(items.getValue());
+ }
+ private void renumberItems(List<Item> list) {
if (list == null) {
return;
}
if (Misc.emptyIsNull(transactionComment) != null)
head.setComment(transactionComment);
- Item.resetIdDispenser();
List<Item> newItems = new ArrayList<>();
newItems.add(head);
newItems.add(accRow);
}
+ renumberItems(newItems);
Misc.onMainThread(() -> replaceItems(newItems));
});
}