Add a specific tab for description.
This commit is contained in:
parent
d8f79b92f9
commit
6528b89f6b
23 changed files with 242 additions and 138 deletions
|
|
@ -5,9 +5,11 @@ import androidx.compose.runtime.mutableStateOf
|
|||
import androidx.compose.runtime.setValue
|
||||
import androidx.lifecycle.ViewModel
|
||||
import androidx.lifecycle.viewModelScope
|
||||
import com.pixelized.rplexicon.model.Description
|
||||
import com.pixelized.rplexicon.repository.data.ActionRepository
|
||||
import com.pixelized.rplexicon.repository.data.AlterationRepository
|
||||
import com.pixelized.rplexicon.repository.data.CharacterSheetRepository
|
||||
import com.pixelized.rplexicon.repository.data.DescriptionRepository
|
||||
import com.pixelized.rplexicon.repository.data.LexiconRepository
|
||||
import com.pixelized.rplexicon.repository.data.LocationRepository
|
||||
import com.pixelized.rplexicon.repository.data.QuestRepository
|
||||
|
|
@ -29,6 +31,7 @@ class LauncherViewModel @Inject constructor(
|
|||
characterSheetRepository: CharacterSheetRepository,
|
||||
actionRepository: ActionRepository,
|
||||
spellRepository: SpellRepository,
|
||||
descriptionRepository: DescriptionRepository,
|
||||
) : ViewModel() {
|
||||
|
||||
private val _error = MutableSharedFlow<String>()
|
||||
|
|
@ -67,7 +70,14 @@ class LauncherViewModel @Inject constructor(
|
|||
_error.tryEmit("CharacterSheet fail to update")
|
||||
}
|
||||
}
|
||||
awaitAll(lexicon, location, quest, characterSheet)
|
||||
val descriptionSheet = async {
|
||||
try {
|
||||
descriptionRepository.fetchDescription()
|
||||
} catch (exception: Exception) {
|
||||
_error.tryEmit("Skill/Spell description fail to update")
|
||||
}
|
||||
}
|
||||
awaitAll(lexicon, location, quest, characterSheet, descriptionSheet)
|
||||
|
||||
val alteration = async {
|
||||
try {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue