Fix altertion deletion on edit from GM.

This commit is contained in:
Thomas Andres Gomez 2025-04-08 12:18:38 +02:00
parent c13cbdcd09
commit fed5db7fa0

View file

@ -120,11 +120,11 @@ class AlterationStore(
private suspend fun handleMessage(message: SocketMessage) {
when (message) {
is AlterationApiSynchronisation -> when (message) {
is ApiSynchronisation.AlterationDelete -> updateAlterationFlow(
is ApiSynchronisation.AlterationUpdate -> updateAlterationFlow(
alterationId = message.alterationId,
)
is ApiSynchronisation.AlterationUpdate -> _alterationsFlow.update { alterations ->
is ApiSynchronisation.AlterationDelete -> _alterationsFlow.update { alterations ->
alterations.toMutableMap().also {
it.remove(message.alterationId)
}