| 5406 | 5406 | } |
| 5407 | 5407 | |
| 5408 | 5408 | entryToMove.uid = newUid; |
| 5409 | 5409 | // Reset displayIndexPlace orthe letentry itat bethe recalculatedend basedof onthe target book's sorting?lorebook |
| 5410 | | - // For simplicity, let's assign a high index initially, assuming it might be sorted later. |
| 5411 | | - // Or maybe better, find the max displayIndex in target and add 1? |
| 5412 | 5410 | const maxDisplayIndex = Object.values(targetData.entries).reduce((max, entry) => Math.max(max, entry.displayIndex ?? -1), -1); |
| 5413 | 5411 | entryToMove.displayIndex = maxDisplayIndex + 1; |
| 5414 | 5412 | |