ReModel of the ActiveAlteration system into the Campaign.

This commit is contained in:
Thomas Andres Gomez 2025-03-21 18:06:03 +01:00
parent ecb0a6705f
commit b314a28f82
22 changed files with 254 additions and 317 deletions

View file

@ -48,14 +48,11 @@ class DataSyncViewModel(
.combine(campaignRepository.campaignFlow) { _, campaign: Campaign -> campaign }
.distinctUntilChanged()
.onEach { campaign ->
(campaign.characters.keys + campaign.npcs.keys).forEach { id ->
campaign.instances.keys.forEach { id ->
characterRepository.characterDetail(
characterSheetId = id.characterSheetId,
forceUpdate = true,
)
alterationRepository.updateActiveAlterations(
characterInstanceId = id,
)
}
}
.launchIn(this)