Auto commit (MindMachine) Fri Apr 10 12:01:02 PM CDT 2026
This commit is contained in:
@@ -80,6 +80,7 @@ class MainViewModel(
|
||||
private val userProgramRepository: UserProgramRepository,
|
||||
private val headsetMonitor: HeadsetMonitor,
|
||||
private val audioEngine: BinauralAudioEngine,
|
||||
private val billingManager: com.mindmachine.mvp.billing.BillingManager,
|
||||
) : ViewModel() {
|
||||
private val _ui = MutableStateFlow(UiState())
|
||||
val ui: StateFlow<UiState> = _ui.asStateFlow()
|
||||
@@ -89,6 +90,7 @@ class MainViewModel(
|
||||
private var cachedPrograms: List<UserProgramEntity> = emptyList()
|
||||
|
||||
init {
|
||||
billingManager.start()
|
||||
viewModelScope.launch {
|
||||
combine(settingsRepository.settings, userProgramRepository.userPrograms) { settings, userPrograms ->
|
||||
settings to userPrograms
|
||||
@@ -486,8 +488,9 @@ class MainViewModel(
|
||||
private val userProgramRepository: UserProgramRepository,
|
||||
private val headsetMonitor: HeadsetMonitor,
|
||||
private val audioEngine: BinauralAudioEngine,
|
||||
private val billingManager: com.mindmachine.mvp.billing.BillingManager,
|
||||
) : ViewModelProvider.Factory {
|
||||
override fun <T : ViewModel> create(modelClass: Class<T>): T =
|
||||
MainViewModel(settingsRepository, userProgramRepository, headsetMonitor, audioEngine) as T
|
||||
MainViewModel(settingsRepository, userProgramRepository, headsetMonitor, audioEngine, billingManager) as T
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user