Skip to content

Commit

Permalink
Return new FakeItemDisplay on MultiModel#add
Browse files Browse the repository at this point in the history
  • Loading branch information
NichtStudioCode committed Aug 20, 2024
1 parent b7a822a commit e626370
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ abstract class MultiModel {
models.forEach(this::add)
}

fun add(model: Model) {
fun add(model: Model): FakeItemDisplay {
val itemDisplay = model.createFakeItemDisplay()
models.put(model, itemDisplay)?.remove()
return itemDisplay
}

fun clear() {
Expand Down

0 comments on commit e626370

Please sign in to comment.