Refactor multiplz Composable/Uio/ViewModel/Factories to use the ImageCache
This commit is contained in:
parent
abdb39abc2
commit
c25395e304
61 changed files with 377 additions and 550 deletions
|
|
@ -12,7 +12,6 @@ import com.pixelized.rplexicon.data.repository.character.CharacterSheetRepositor
|
|||
import com.pixelized.rplexicon.data.repository.character.DescriptionRepository
|
||||
import com.pixelized.rplexicon.data.repository.character.EquipmentRepository
|
||||
import com.pixelized.rplexicon.data.repository.character.ItemsRepository
|
||||
import com.pixelized.rplexicon.data.repository.character.ObjectActionRepository
|
||||
import com.pixelized.rplexicon.data.repository.character.SkillRepository
|
||||
import com.pixelized.rplexicon.data.repository.character.SpellRepository
|
||||
import com.pixelized.rplexicon.data.repository.firebase.RemoteConfigRepository
|
||||
|
|
@ -41,7 +40,6 @@ class LauncherViewModel @Inject constructor(
|
|||
alterationRepository: AlterationRepository,
|
||||
characterSheetRepository: CharacterSheetRepository,
|
||||
actionRepository: ActionRepository,
|
||||
objectActionRepository: ObjectActionRepository,
|
||||
spellRepository: SpellRepository,
|
||||
skillRepository: SkillRepository,
|
||||
descriptionRepository: DescriptionRepository,
|
||||
|
|
@ -148,14 +146,6 @@ class LauncherViewModel @Inject constructor(
|
|||
_error.emit(FetchErrorUio.Structure(type = Type.SKILL))
|
||||
}
|
||||
}
|
||||
val objects = async {
|
||||
try {
|
||||
objectActionRepository.fetchObjectAction()
|
||||
} catch (exception: Exception) {
|
||||
Log.e(TAG, exception.message, exception)
|
||||
_error.emit(FetchErrorUio.Structure(type = Type.OBJECT))
|
||||
}
|
||||
}
|
||||
val spell = async {
|
||||
try {
|
||||
spellRepository.fetchSpells()
|
||||
|
|
@ -166,7 +156,7 @@ class LauncherViewModel @Inject constructor(
|
|||
}
|
||||
|
||||
awaitAll(order, lexicon, location, quest)
|
||||
awaitAll(description, inventory, equipment, alteration, action, objects, spell, skill)
|
||||
awaitAll(description, inventory, equipment, alteration, action, spell, skill)
|
||||
|
||||
withContext(Dispatchers.Main) {
|
||||
isLoading = false
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue