Коммит 040a3209 создал по автору Radch-enko's avatar Radch-enko
Просмотр файлов

Enhance slot rendering and update event logic

- Added key-based item rendering in `RoomInfoLeftPanel` for efficient slot updates.
- Introduced `animateItem` modifier for smoother slot animations.
- Refactored `updateEvent` logic to utilize a dedicated `IO` coroutine scope for better thread handling.
владелец afbce0a0
......@@ -79,11 +79,12 @@ fun RoomInfoLeftPanel(
)
}
items(slotState.slots) {
items(slotState.slots, key = { it.slot.hashCode() }) {
Box(
modifier = Modifier
.fillMaxSize()
.padding(horizontal = 30.dp)
.animateItem()
) {
SlotView(
slotUi = it,
......
......@@ -113,7 +113,9 @@ class UpdateEventComponent(
}
private fun updateEvent() = scope.launch {
updateBookingUseCase(roomName = room, eventInfo = stateToEventInfoMapper.map(state.value))
CoroutineScope(Dispatchers.IO).launch {
updateBookingUseCase(roomName = room, eventInfo = stateToEventInfoMapper.map(state.value))
}
onCloseRequest()
}
......
Поддерживает Markdown
0% или .
You are about to add 0 people to the discussion. Proceed with caution.
Сначала завершите редактирование этого сообщения!
Пожалуйста, зарегистрируйтесь или чтобы прокомментировать