fix(agenda): scope LazyColumn key by day for spanning events

A multi-day event now appears under every day it spans, so keying its
row by instanceId alone repeated the key across days and crashed the
LazyColumn ("Key already used") on scroll. Scope the key by day.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-07-19 11:30:00 +02:00
parent 7ed1d89b66
commit 19baed9291

View File

@@ -367,7 +367,10 @@ private fun AgendaList(
} else {
itemsIndexed(
items = day.events,
key = { _, event -> event.instanceId },
// Scope the key by day: a multi-day event appears under every
// day it spans, so its instanceId alone is not unique across
// the list (LazyColumn requires unique keys).
key = { _, event -> "${day.date}-${event.instanceId}" },
) { index, event ->
AgendaEventRow(
event = event,