-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from clemenceroumy/fix-lists
fix: change list enum to data class + init user custom list on startApp
- Loading branch information
Showing
10 changed files
with
83 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 1 addition & 3 deletions
4
app/src/main/java/com/croumy/hltb_wearos/presentation/models/api/GameRequest.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 12 additions & 4 deletions
16
app/src/main/java/com/croumy/hltb_wearos/presentation/ui/startapp/StartAppViewModel.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,21 @@ | ||
package com.croumy.hltb_wearos.presentation.ui.startapp | ||
|
||
import androidx.compose.runtime.collectAsState | ||
import androidx.lifecycle.ViewModel | ||
import com.croumy.hltb_wearos.presentation.data.AppService | ||
import com.croumy.hltb_wearos.presentation.data.PreferencesService | ||
import com.croumy.hltb_wearos.presentation.data.HLTBService | ||
import com.croumy.hltb_wearos.presentation.models.api.Category | ||
import dagger.hilt.android.lifecycle.HiltViewModel | ||
import javax.inject.Inject | ||
|
||
@HiltViewModel | ||
class StartAppViewModel @Inject constructor( | ||
val appService: AppService | ||
): ViewModel() | ||
val appService: AppService, | ||
private val hltbService: HLTBService | ||
) : ViewModel() { | ||
suspend fun initCategories() { | ||
val user = hltbService.getUser() | ||
Category.Custom.label = user?.set_customtab | ||
Category.Custom2.label = user?.set_customtab2 | ||
Category.Custom3.label = user?.set_customtab3 | ||
} | ||
} |