ReModel of the ActiveAlteration system into the Campaign.
This commit is contained in:
		
							parent
							
								
									ecb0a6705f
								
							
						
					
					
						commit
						b314a28f82
					
				
					 22 changed files with 254 additions and 317 deletions
				
			
		| 
						 | 
				
			
			@ -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)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue