File tree 2 files changed +4
-4
lines changed
app/src/main/java/com/example/runningavater/settings
2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ fun GoalSettingDialog(
36
36
dialogTitle : String ,
37
37
dialogText : String ,
38
38
icon : ImageVector ,
39
- viewModel : RoadDataStoreProfile = viewModel(),
39
+ viewModel : GoalSettingViewModel = viewModel(),
40
40
) {
41
41
val bearName by viewModel.roadTargetSteps.collectAsState(initial = " 未設定" )
42
42
var bearTextFieldValue by rememberSaveable { mutableStateOf(" " ) }
@@ -91,7 +91,7 @@ fun GoalSettingDialog(
91
91
)
92
92
}
93
93
94
- class RoadDataStoreProfile (application : Application ) : AndroidViewModel(application) {
94
+ class GoalSettingViewModel (application : Application ) : AndroidViewModel(application) {
95
95
val roadTargetSteps: Flow <String > =
96
96
getApplication<Application >().dataStore.data.map { preferences ->
97
97
preferences[targetSteps] ? : " "
Original file line number Diff line number Diff line change @@ -68,7 +68,7 @@ fun ProfileScreen(
68
68
navController : NavHostController ,
69
69
profileImageUri : Uri ? ,
70
70
onImageSelected : (Uri ) -> Unit ,
71
- viewModel : roadDataStoreProfile = viewModel()
71
+ viewModel : ProfileViewModel = viewModel()
72
72
) {
73
73
var selectedUserIcon by rememberSaveable { mutableStateOf(" " ) }
74
74
val userIcon by viewModel.roadUserIcon.collectAsState(initial = " " )
@@ -281,7 +281,7 @@ fun ProfileScreen(
281
281
}
282
282
}
283
283
284
- class roadDataStoreProfile (application : Application ) : AndroidViewModel(application) {
284
+ class ProfileViewModel (application : Application ) : AndroidViewModel(application) {
285
285
val roadUserIcon: Flow <String > = getApplication<Application >().dataStore.data.map { preferences ->
286
286
preferences[userIcon] ? : " "
287
287
}
You can’t perform that action at this time.
0 commit comments