diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml index 12ac7016..8da8985c 100644 --- a/app/src/main/AndroidManifest.xml +++ b/app/src/main/AndroidManifest.xml @@ -157,6 +157,7 @@ + suspend fun patchUserProfile( + @Body userProfileResponseModel: UserProfileRequestDto + ): NonDataBaseResponse + suspend fun getParticipantProfile( participantProfileRequestModel: ParticipantProfileRequestDto ): BaseResponse diff --git a/data/src/main/java/com/going/data/datasourceImpl/ProfileDataSourceImpl.kt b/data/src/main/java/com/going/data/datasourceImpl/ProfileDataSourceImpl.kt index 84418481..bb798a66 100644 --- a/data/src/main/java/com/going/data/datasourceImpl/ProfileDataSourceImpl.kt +++ b/data/src/main/java/com/going/data/datasourceImpl/ProfileDataSourceImpl.kt @@ -2,7 +2,9 @@ package com.going.data.datasourceImpl import com.going.data.datasource.ProfileDataSource import com.going.data.dto.BaseResponse +import com.going.data.dto.NonDataBaseResponse import com.going.data.dto.request.ParticipantProfileRequestDto +import com.going.data.dto.request.UserProfileRequestDto import com.going.data.dto.response.ParticipantProfileResponseDto import com.going.data.dto.response.UserProfileResponseDto import com.going.data.service.ProfileService @@ -15,6 +17,10 @@ class ProfileDataSourceImpl @Inject constructor( override suspend fun getUserProfile(): BaseResponse = profileService.getUserProfile() + override suspend fun patchUserProfile(request: UserProfileRequestDto): NonDataBaseResponse = + profileService.patchUserProfile(request) + + override suspend fun getParticipantProfile(participantProfileRequestDto: ParticipantProfileRequestDto): BaseResponse = profileService.getParticipantProfile(participantProfileRequestDto.participantId) } diff --git a/data/src/main/java/com/going/data/dto/request/UserProfileRequestDto.kt b/data/src/main/java/com/going/data/dto/request/UserProfileRequestDto.kt new file mode 100644 index 00000000..4252ad2d --- /dev/null +++ b/data/src/main/java/com/going/data/dto/request/UserProfileRequestDto.kt @@ -0,0 +1,18 @@ +package com.going.data.dto.request + +import com.going.domain.entity.request.TokenReissueRequestModel +import com.going.domain.entity.request.UserProfileRequestModel +import com.going.domain.entity.response.UserProfileResponseModel +import kotlinx.serialization.SerialName +import kotlinx.serialization.Serializable + +@Serializable +data class UserProfileRequestDto( + @SerialName("name") + val name: String, + @SerialName("intro") + val intro: String, +) + +fun UserProfileRequestModel.toDto() = UserProfileRequestDto(name, intro) + diff --git a/data/src/main/java/com/going/data/dto/response/UserProfileResponseDto.kt b/data/src/main/java/com/going/data/dto/response/UserProfileResponseDto.kt index c9db28ae..09aedcc7 100644 --- a/data/src/main/java/com/going/data/dto/response/UserProfileResponseDto.kt +++ b/data/src/main/java/com/going/data/dto/response/UserProfileResponseDto.kt @@ -1,6 +1,7 @@ package com.going.data.dto.response import com.going.domain.entity.request.UserProfileRequestModel +import com.going.domain.entity.response.UserProfileResponseModel import kotlinx.serialization.SerialName import kotlinx.serialization.Serializable @@ -13,5 +14,5 @@ data class UserProfileResponseDto( @SerialName("result") val result: Int, ) { - fun toProfileModel() = UserProfileRequestModel(name, intro, result) + fun toProfileModel() = UserProfileResponseModel(name, intro, result) } diff --git a/data/src/main/java/com/going/data/repositoryImpl/ProfileRepositoryImpl.kt b/data/src/main/java/com/going/data/repositoryImpl/ProfileRepositoryImpl.kt index 2a7db2bd..c1f413ed 100644 --- a/data/src/main/java/com/going/data/repositoryImpl/ProfileRepositoryImpl.kt +++ b/data/src/main/java/com/going/data/repositoryImpl/ProfileRepositoryImpl.kt @@ -1,21 +1,29 @@ package com.going.data.repositoryImpl import com.going.data.datasource.ProfileDataSource +import com.going.data.dto.request.toDto import com.going.data.dto.request.toParticipantRequestDto import com.going.domain.entity.request.ParticipantProfileRequestModel import com.going.domain.entity.request.UserProfileRequestModel import com.going.domain.entity.response.ParticipantProfileResponseModel +import com.going.domain.entity.response.UserProfileResponseModel import com.going.domain.repository.ProfileRepository import javax.inject.Inject class ProfileRepositoryImpl @Inject constructor( private val profileDataSource: ProfileDataSource ) : ProfileRepository { - override suspend fun getUserProfile(): Result = + override suspend fun getUserProfile(): Result = runCatching { profileDataSource.getUserProfile().data.toProfileModel() } + override suspend fun patchUserProfile(userProfileResponseModel: UserProfileRequestModel): Result = + runCatching { + profileDataSource.patchUserProfile(userProfileResponseModel.toDto()) + } + + override suspend fun getParticipantProfile( participantProfileRequestModel: ParticipantProfileRequestModel ): Result = diff --git a/data/src/main/java/com/going/data/service/ProfileService.kt b/data/src/main/java/com/going/data/service/ProfileService.kt index 75a867d9..313bd8cc 100644 --- a/data/src/main/java/com/going/data/service/ProfileService.kt +++ b/data/src/main/java/com/going/data/service/ProfileService.kt @@ -1,17 +1,27 @@ package com.going.data.service import com.going.data.dto.BaseResponse +import com.going.data.dto.NonDataBaseResponse import com.going.data.dto.request.ParticipantProfileRequestDto +import com.going.data.dto.request.StartInviteTripRequestDto +import com.going.data.dto.request.UserProfileRequestDto import com.going.data.dto.response.ParticipantProfileResponseDto import com.going.data.dto.response.UserProfileResponseDto import com.going.domain.entity.request.ParticipantProfileRequestModel +import retrofit2.http.Body import retrofit2.http.GET +import retrofit2.http.PATCH import retrofit2.http.Path interface ProfileService { @GET("api/users/profile") suspend fun getUserProfile(): BaseResponse + @PATCH("api/users/profile") + suspend fun patchUserProfile( + @Body request: UserProfileRequestDto, + ): NonDataBaseResponse + @GET("api/trips/participants/{participantId}") suspend fun getParticipantProfile( @Path("participantId") participantId: Long diff --git a/domain/src/main/kotlin/com/going/domain/entity/request/UserProfileRequestModel.kt b/domain/src/main/kotlin/com/going/domain/entity/request/UserProfileRequestModel.kt index 77c046d6..6d46de19 100644 --- a/domain/src/main/kotlin/com/going/domain/entity/request/UserProfileRequestModel.kt +++ b/domain/src/main/kotlin/com/going/domain/entity/request/UserProfileRequestModel.kt @@ -3,5 +3,4 @@ package com.going.domain.entity.request data class UserProfileRequestModel( val name: String, val intro: String, - val result: Int, ) diff --git a/domain/src/main/kotlin/com/going/domain/entity/response/UserProfileResponseModel.kt b/domain/src/main/kotlin/com/going/domain/entity/response/UserProfileResponseModel.kt new file mode 100644 index 00000000..9718c728 --- /dev/null +++ b/domain/src/main/kotlin/com/going/domain/entity/response/UserProfileResponseModel.kt @@ -0,0 +1,7 @@ +package com.going.domain.entity.response + +data class UserProfileResponseModel( + val name: String, + val intro: String, + val result: Int, +) diff --git a/domain/src/main/kotlin/com/going/domain/repository/ProfileRepository.kt b/domain/src/main/kotlin/com/going/domain/repository/ProfileRepository.kt index 6ea6f7ac..6405f538 100644 --- a/domain/src/main/kotlin/com/going/domain/repository/ProfileRepository.kt +++ b/domain/src/main/kotlin/com/going/domain/repository/ProfileRepository.kt @@ -3,9 +3,12 @@ package com.going.domain.repository import com.going.domain.entity.request.ParticipantProfileRequestModel import com.going.domain.entity.request.UserProfileRequestModel import com.going.domain.entity.response.ParticipantProfileResponseModel +import com.going.domain.entity.response.UserProfileResponseModel interface ProfileRepository { - suspend fun getUserProfile(): Result + suspend fun getUserProfile(): Result + + suspend fun patchUserProfile(userProfileResponseModel: UserProfileRequestModel): Result suspend fun getParticipantProfile(participantProfileRequestModel: ParticipantProfileRequestModel): Result } diff --git a/presentation/src/main/java/com/going/presentation/onboarding/splash/SplashActivity.kt b/presentation/src/main/java/com/going/presentation/onboarding/splash/SplashActivity.kt index 25920af2..17b83af6 100644 --- a/presentation/src/main/java/com/going/presentation/onboarding/splash/SplashActivity.kt +++ b/presentation/src/main/java/com/going/presentation/onboarding/splash/SplashActivity.kt @@ -5,12 +5,10 @@ import android.os.Bundle import androidx.activity.viewModels import androidx.lifecycle.flowWithLifecycle import androidx.lifecycle.lifecycleScope -import com.going.domain.entity.AuthState import com.going.presentation.R import com.going.presentation.dashboard.DashBoardActivity import com.going.presentation.databinding.ActivitySplashBinding import com.going.presentation.onboarding.signin.SignInActivity -import com.going.presentation.tendency.splash.TendencySplashActivity import com.going.presentation.util.navigateToScreenClear import com.going.ui.base.BaseActivity import com.going.ui.extension.setNavigationBarColorFromResource @@ -46,12 +44,8 @@ class SplashActivity : BaseActivity(R.layout.activity_spl private fun observeUserState() { viewModel.userState.flowWithLifecycle(lifecycle).onEach { state -> - when (state) { - AuthState.LOADING -> return@onEach - AuthState.SUCCESS -> navigateToScreenClear() - AuthState.FAILURE -> navigateToScreenClear() - AuthState.OTHER_PAGE -> navigateToScreenClear() - } + if (state) navigateToScreenClear() + else navigateToScreenClear() }.launchIn(lifecycleScope) } diff --git a/presentation/src/main/java/com/going/presentation/onboarding/splash/SplashViewModel.kt b/presentation/src/main/java/com/going/presentation/onboarding/splash/SplashViewModel.kt index eca2a62a..70f316e1 100644 --- a/presentation/src/main/java/com/going/presentation/onboarding/splash/SplashViewModel.kt +++ b/presentation/src/main/java/com/going/presentation/onboarding/splash/SplashViewModel.kt @@ -3,56 +3,33 @@ package com.going.presentation.onboarding.splash import androidx.lifecycle.LifecycleOwner import androidx.lifecycle.ViewModel import androidx.lifecycle.lifecycleScope -import androidx.lifecycle.viewModelScope -import com.going.domain.entity.AuthState -import com.going.domain.repository.AuthRepository import com.going.domain.repository.TokenRepository -import com.going.presentation.util.toErrorCode import dagger.hilt.android.lifecycle.HiltViewModel import kotlinx.coroutines.delay -import kotlinx.coroutines.flow.MutableStateFlow -import kotlinx.coroutines.flow.StateFlow +import kotlinx.coroutines.flow.MutableSharedFlow +import kotlinx.coroutines.flow.SharedFlow import kotlinx.coroutines.launch import javax.inject.Inject @HiltViewModel class SplashViewModel @Inject constructor( - private val authRepository: AuthRepository, private val tokenRepository: TokenRepository, ) : ViewModel() { - private val _userState = MutableStateFlow(AuthState.LOADING) - val userState: StateFlow = _userState + private val _userState = MutableSharedFlow() + val userState: SharedFlow + get() = _userState + private fun getHasAccessToken(): Boolean = tokenRepository.getAccessToken().isNotBlank() fun initSplash(lifecycleOwner: LifecycleOwner) { lifecycleOwner.lifecycleScope.launch { delay(DELAY_TIME) - if (getHasAccessToken()) { - getUserState() - } else { - _userState.value = AuthState.FAILURE - } + _userState.emit(getHasAccessToken()) } } - private fun getUserState() = - viewModelScope.launch { - authRepository.getSplash().onSuccess { - _userState.value = AuthState.SUCCESS - }.onFailure { - val errorCode = toErrorCode(it) - - _userState.value = when (errorCode) { - TENDENCY -> AuthState.OTHER_PAGE - else -> AuthState.FAILURE - } - } - } - companion object { private const val DELAY_TIME = 2200L - - private const val TENDENCY = "e4045" } } diff --git a/presentation/src/main/java/com/going/presentation/profile/edit/ProfileEditActivity.kt b/presentation/src/main/java/com/going/presentation/profile/edit/ProfileEditActivity.kt index 8d18bbe8..d1422875 100644 --- a/presentation/src/main/java/com/going/presentation/profile/edit/ProfileEditActivity.kt +++ b/presentation/src/main/java/com/going/presentation/profile/edit/ProfileEditActivity.kt @@ -9,8 +9,10 @@ import androidx.lifecycle.flowWithLifecycle import androidx.lifecycle.lifecycleScope import com.going.presentation.R import com.going.presentation.databinding.ActivityProfileEditBinding +import com.going.presentation.designsystem.snackbar.customSnackBar import com.going.ui.base.BaseActivity import com.going.ui.extension.setOnSingleClickListener +import com.going.ui.extension.toast import dagger.hilt.android.AndroidEntryPoint import kotlinx.coroutines.flow.launchIn import kotlinx.coroutines.flow.onEach @@ -30,6 +32,8 @@ class ProfileEditActivity : observeInfoTextChanged() observeIsValueChanged() initBackBtnClickListener() + initProfileEditBtnClickListener() + observeIsChangedSuccess() } private fun setEtNameArguments() { @@ -82,6 +86,21 @@ class ProfileEditActivity : } } + private fun initProfileEditBtnClickListener() { + binding.btnProfileEditFinish.setOnSingleClickListener { + viewModel.patchUserInfo() + } + } + + private fun observeIsChangedSuccess() { + viewModel.isChangedSuccess.flowWithLifecycle(lifecycle).onEach { + if (it) { + toast(getString(R.string.edit_profile_finish)) + finish() + } else customSnackBar(binding.root, getString(R.string.server_error)) + }.launchIn(lifecycleScope) + } + companion object { private const val NICKNAME = "NICKNAME" private const val INFO = "INFO" diff --git a/presentation/src/main/java/com/going/presentation/profile/edit/ProfileEditViewModel.kt b/presentation/src/main/java/com/going/presentation/profile/edit/ProfileEditViewModel.kt index 42b5bee7..4ccb9a27 100644 --- a/presentation/src/main/java/com/going/presentation/profile/edit/ProfileEditViewModel.kt +++ b/presentation/src/main/java/com/going/presentation/profile/edit/ProfileEditViewModel.kt @@ -1,14 +1,29 @@ package com.going.presentation.profile.edit import androidx.lifecycle.ViewModel +import androidx.lifecycle.viewModelScope +import com.going.domain.entity.request.UserProfileRequestModel +import com.going.domain.repository.ProfileRepository import com.going.presentation.onboarding.signup.SignUpViewModel +import dagger.hilt.android.lifecycle.HiltViewModel +import kotlinx.coroutines.flow.MutableSharedFlow import kotlinx.coroutines.flow.MutableStateFlow +import kotlinx.coroutines.flow.SharedFlow import kotlinx.coroutines.flow.StateFlow +import kotlinx.coroutines.launch +import javax.inject.Inject -class ProfileEditViewModel : ViewModel() { +@HiltViewModel +class ProfileEditViewModel @Inject constructor( + private val profileRepository: ProfileRepository, +) : ViewModel() { private val _isValueChanged = MutableStateFlow(false) val isValueChanged: StateFlow = _isValueChanged + private val _isChangedSuccess = MutableSharedFlow() + val isChangedSuccess: SharedFlow + get() = _isChangedSuccess + private var isNameChanged = false private var isInfoChanged = false @@ -44,6 +59,17 @@ class ProfileEditViewModel : ViewModel() { nowName.length <= getMaxNameLen() && nowInfo.length <= getMaxInfoLen() && (isInfoChanged || isNameChanged) } + fun patchUserInfo() { + viewModelScope.launch { + profileRepository.patchUserProfile(UserProfileRequestModel(nowName, nowInfo)) + .onSuccess { + _isChangedSuccess.emit(true) + }.onFailure { + _isChangedSuccess.emit(false) + } + } + } + fun getMaxNameLen() = SignUpViewModel.MAX_NAME_LEN fun getMaxInfoLen() = SignUpViewModel.MAX_INFO_LEN diff --git a/presentation/src/main/java/com/going/presentation/profile/my/ProfileActivity.kt b/presentation/src/main/java/com/going/presentation/profile/my/ProfileActivity.kt index 5d7e5b1e..43f351d5 100644 --- a/presentation/src/main/java/com/going/presentation/profile/my/ProfileActivity.kt +++ b/presentation/src/main/java/com/going/presentation/profile/my/ProfileActivity.kt @@ -42,6 +42,11 @@ class ProfileActivity : initRestartBtnClickListener() } + override fun onResume() { + super.onResume() + getUserInfo() + } + private fun getUserInfo() { profileViewModel.getUserInfoState() } diff --git a/presentation/src/main/java/com/going/presentation/profile/my/ProfileViewModel.kt b/presentation/src/main/java/com/going/presentation/profile/my/ProfileViewModel.kt index dd390654..76defeb9 100644 --- a/presentation/src/main/java/com/going/presentation/profile/my/ProfileViewModel.kt +++ b/presentation/src/main/java/com/going/presentation/profile/my/ProfileViewModel.kt @@ -3,6 +3,7 @@ package com.going.presentation.profile.my import androidx.lifecycle.ViewModel import androidx.lifecycle.viewModelScope import com.going.domain.entity.request.UserProfileRequestModel +import com.going.domain.entity.response.UserProfileResponseModel import com.going.domain.repository.ProfileRepository import com.going.ui.state.UiState import dagger.hilt.android.lifecycle.HiltViewModel @@ -16,8 +17,8 @@ class ProfileViewModel @Inject constructor( private val profileRepository: ProfileRepository, ) : ViewModel() { - private val _userInfoState = MutableStateFlow>(UiState.Empty) - val userInfoState: StateFlow> = _userInfoState + private val _userInfoState = MutableStateFlow>(UiState.Empty) + val userInfoState: StateFlow> = _userInfoState val profileId = MutableStateFlow(0) diff --git a/presentation/src/main/java/com/going/presentation/profile/participant/ParticipantProfileActivity.kt b/presentation/src/main/java/com/going/presentation/profile/participant/ParticipantProfileActivity.kt index 01b0b4ad..ae0147e1 100644 --- a/presentation/src/main/java/com/going/presentation/profile/participant/ParticipantProfileActivity.kt +++ b/presentation/src/main/java/com/going/presentation/profile/participant/ParticipantProfileActivity.kt @@ -13,7 +13,9 @@ import coil.transform.CircleCropTransformation import com.going.domain.entity.response.ParticipantProfileResponseModel import com.going.presentation.R import com.going.presentation.databinding.ActivityParticipantProfileBinding +import com.going.presentation.designsystem.snackbar.customSnackBar import com.going.presentation.profile.edit.ProfileEditActivity +import com.going.presentation.profile.trip.tripprofiletag.profiletag.TripProfileTagFragment import com.going.presentation.tendency.result.UserTendencyResultList import com.going.presentation.util.downloadImage import com.going.ui.base.BaseActivity @@ -35,6 +37,7 @@ class ParticipantProfileActivity : private val participantId: Long by lazy { intent.getLongExtra(PARTICIPANT_ID, 0) } + var isEmpty: Boolean = true override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) @@ -53,13 +56,14 @@ class ParticipantProfileActivity : private fun observeParticipantProfileState() { participantProfileViewModel.participantProfile.flowWithLifecycle(lifecycle).onEach { - it?.let { bindData(it) } ?: toast(getString(R.string.server_error)) + it?.let { bindData(it) } ?: customSnackBar(binding.root, getString(R.string.server_error)) }.launchIn(lifecycleScope) } private fun bindData(profile: ParticipantProfileResponseModel) { binding.run { if (profile.result != -1) { + isEmpty = false UserTendencyResultList[profile.result].run { ivProfile.load(profileImage) { transformations(CircleCropTransformation()) @@ -101,7 +105,7 @@ class ParticipantProfileActivity : binding.appbarTripProfile.layoutParams as CoordinatorLayout.LayoutParams val behavior = params.behavior as AppBarLayout.Behavior? - with(tab.position == 0 && participantProfileViewModel.isEmpty) { + with(tab.position == 0 && isEmpty) { behavior?.setDragCallback(object : DragCallback() { override fun canDrag(appBarLayout: AppBarLayout): Boolean { return !this@with @@ -111,6 +115,9 @@ class ParticipantProfileActivity : if (this) binding.appbarTripProfile.setExpanded(true) + val myFragment = + supportFragmentManager.findFragmentByTag("f" + binding.vpTripProfile.currentItem) + if (myFragment is TripProfileTagFragment) myFragment.scrollTop() } binding.vpTripProfile.currentItem = tab.position @@ -144,7 +151,7 @@ class ParticipantProfileActivity : binding.vpTripProfile.layoutParams = binding.vpTripProfile.layoutParams.also { it.height = - if (temp) displayHeight - toolbarHeight - appBarHeight - tabHeight else displayHeight + if (temp) displayHeight - toolbarHeight - appBarHeight - tabHeight else displayHeight - toolbarHeight - tabHeight } } diff --git a/presentation/src/main/java/com/going/presentation/profile/participant/ParticipantProfileViewModel.kt b/presentation/src/main/java/com/going/presentation/profile/participant/ParticipantProfileViewModel.kt index 59a605cc..dc9c76a9 100644 --- a/presentation/src/main/java/com/going/presentation/profile/participant/ParticipantProfileViewModel.kt +++ b/presentation/src/main/java/com/going/presentation/profile/participant/ParticipantProfileViewModel.kt @@ -23,9 +23,6 @@ class ParticipantProfileViewModel @Inject constructor( val participantProfile: SharedFlow = _participantProfile var number: Int = 0 - val isEmpty: Boolean by lazy { - number == -1 - } fun getUserInfoState(participantId: Long) { viewModelScope.launch { diff --git a/presentation/src/main/java/com/going/presentation/profile/participant/ParticipantProfileViewPagerAdapter.kt b/presentation/src/main/java/com/going/presentation/profile/participant/ParticipantProfileViewPagerAdapter.kt index b2c13cc2..84fd51fc 100644 --- a/presentation/src/main/java/com/going/presentation/profile/participant/ParticipantProfileViewPagerAdapter.kt +++ b/presentation/src/main/java/com/going/presentation/profile/participant/ParticipantProfileViewPagerAdapter.kt @@ -2,6 +2,7 @@ package com.going.presentation.profile.participant import androidx.fragment.app.Fragment import androidx.viewpager2.adapter.FragmentStateAdapter +import com.going.presentation.profile.trip.tripprofiletag.profiletag.TripProfileTagFragment class ParticipantProfileViewPagerAdapter(activity: ParticipantProfileActivity) : FragmentStateAdapter(activity) { override fun getItemCount(): Int = 2 @@ -9,6 +10,6 @@ class ParticipantProfileViewPagerAdapter(activity: ParticipantProfileActivity) : override fun createFragment(position: Int): Fragment = when (position) { 0 -> ParticipantProfileCharacterFragment() - else -> ParticipantProfileTagFragment() + else -> TripProfileTagFragment() } } \ No newline at end of file diff --git a/presentation/src/main/java/com/going/presentation/profile/trip/tripprofiletag/profiletag/TripProfileTagFragment.kt b/presentation/src/main/java/com/going/presentation/profile/trip/tripprofiletag/profiletag/TripProfileTagFragment.kt index 77b05dc1..ae87a5a8 100644 --- a/presentation/src/main/java/com/going/presentation/profile/trip/tripprofiletag/profiletag/TripProfileTagFragment.kt +++ b/presentation/src/main/java/com/going/presentation/profile/trip/tripprofiletag/profiletag/TripProfileTagFragment.kt @@ -47,4 +47,5 @@ class TripProfileTagFragment : } } + fun scrollTop() = binding.nsvPreferenceTag.scrollTo(0, 0) } diff --git a/presentation/src/main/java/com/going/presentation/tendency/result/TendencyResultViewModel.kt b/presentation/src/main/java/com/going/presentation/tendency/result/TendencyResultViewModel.kt index 5dd64fad..b39fb735 100644 --- a/presentation/src/main/java/com/going/presentation/tendency/result/TendencyResultViewModel.kt +++ b/presentation/src/main/java/com/going/presentation/tendency/result/TendencyResultViewModel.kt @@ -3,6 +3,7 @@ package com.going.presentation.tendency.result import androidx.lifecycle.ViewModel import androidx.lifecycle.viewModelScope import com.going.domain.entity.request.UserProfileRequestModel +import com.going.domain.entity.response.UserProfileResponseModel import com.going.domain.repository.ProfileRepository import com.going.ui.state.UiState import dagger.hilt.android.lifecycle.HiltViewModel @@ -16,8 +17,8 @@ class TendencyResultViewModel @Inject constructor( private val profileRepository: ProfileRepository, ) : ViewModel() { - private val _userInfoState = MutableStateFlow>(UiState.Empty) - val userInfoState: StateFlow> = _userInfoState + private val _userInfoState = MutableStateFlow>(UiState.Empty) + val userInfoState: StateFlow> = _userInfoState val tendencyId = MutableStateFlow(0) diff --git a/presentation/src/main/java/com/going/presentation/todo/mytodo/todolist/MyTodoListViewHolder.kt b/presentation/src/main/java/com/going/presentation/todo/mytodo/todolist/MyTodoListViewHolder.kt index 16c28562..bea34144 100644 --- a/presentation/src/main/java/com/going/presentation/todo/mytodo/todolist/MyTodoListViewHolder.kt +++ b/presentation/src/main/java/com/going/presentation/todo/mytodo/todolist/MyTodoListViewHolder.kt @@ -39,7 +39,7 @@ class MyTodoListViewHolder( ivMyTodoLock.setImageResource(R.drawable.ic_lock_complete) tvMyTodoLock.setTextColor(binding.root.context.colorOf(R.color.gray_300)) } else { - tvMyTodoItemTitle.setTextColor(binding.root.context.colorOf(R.color.black_000)) + tvMyTodoItemTitle.setTextColor(binding.root.context.colorOf(R.color.gray_700)) tvMyTodoItemDate.setTextColor(binding.root.context.colorOf(R.color.gray_300)) layoutMyTodoLock.setBackgroundResource(R.drawable.shape_rect_2_gray400_line) ivMyTodoLock.setImageResource(R.drawable.ic_lock_uncomplete) diff --git a/presentation/src/main/java/com/going/presentation/todo/ourtodo/todolist/OurTodoListViewHolder.kt b/presentation/src/main/java/com/going/presentation/todo/ourtodo/todolist/OurTodoListViewHolder.kt index 416c422c..ded7c72c 100644 --- a/presentation/src/main/java/com/going/presentation/todo/ourtodo/todolist/OurTodoListViewHolder.kt +++ b/presentation/src/main/java/com/going/presentation/todo/ourtodo/todolist/OurTodoListViewHolder.kt @@ -34,7 +34,7 @@ class OurTodoListViewHolder( tvOurTodoItemTitle.setTextColor(binding.root.context.colorOf(R.color.gray_300)) tvOurTodoItemDate.setTextColor(binding.root.context.colorOf(R.color.gray_200)) } else { - tvOurTodoItemTitle.setTextColor(binding.root.context.colorOf(R.color.black_000)) + tvOurTodoItemTitle.setTextColor(binding.root.context.colorOf(R.color.gray_700)) tvOurTodoItemDate.setTextColor(binding.root.context.colorOf(R.color.gray_300)) } diff --git a/presentation/src/main/res/drawable/layer_list_trip_dash_board_view_pager.xml b/presentation/src/main/res/drawable/layer_list_trip_dash_board_view_pager.xml index 8f662551..5948dab2 100644 --- a/presentation/src/main/res/drawable/layer_list_trip_dash_board_view_pager.xml +++ b/presentation/src/main/res/drawable/layer_list_trip_dash_board_view_pager.xml @@ -3,12 +3,12 @@ - + - + \ No newline at end of file diff --git a/presentation/src/main/res/layout/activity_create_trip.xml b/presentation/src/main/res/layout/activity_create_trip.xml index a06b86d3..70a21aaf 100644 --- a/presentation/src/main/res/layout/activity_create_trip.xml +++ b/presentation/src/main/res/layout/activity_create_trip.xml @@ -110,7 +110,7 @@ android:layout_height="wrap_content" android:layout_marginTop="37dp" android:text="@string/create_trip_one_line_info_tv_title" - android:textColor="@color/black_000" + android:textColor="@color/gray_700" app:layout_constraintStart_toStartOf="@id/et_create_trip_name" app:layout_constraintTop_toBottomOf="@id/et_create_trip_name" /> @@ -141,7 +141,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/create_trip_slash" - android:textColor="@color/black_000" + android:textColor="@color/gray_700" app:layout_constraintStart_toStartOf="@id/et_create_trip_name" app:layout_constraintTop_toBottomOf="@id/et_create_trip_name" /> diff --git a/presentation/src/main/res/layout/activity_mock.xml b/presentation/src/main/res/layout/activity_mock.xml deleted file mode 100644 index 91ac8195..00000000 --- a/presentation/src/main/res/layout/activity_mock.xml +++ /dev/null @@ -1,48 +0,0 @@ - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/presentation/src/main/res/layout/activity_profile_edit.xml b/presentation/src/main/res/layout/activity_profile_edit.xml index b3a2a52f..f2b40ae2 100644 --- a/presentation/src/main/res/layout/activity_profile_edit.xml +++ b/presentation/src/main/res/layout/activity_profile_edit.xml @@ -79,7 +79,7 @@ android:enabled="false" android:outlineProvider="none" android:paddingVertical="10dp" - android:text="@string/sign_up_finish_btn" + android:text="@string/save" android:textColor="@color/gray_200" android:textSize="16sp" app:layout_constraintBottom_toBottomOf="parent" diff --git a/presentation/src/main/res/layout/fragment_trip_profile_tag.xml b/presentation/src/main/res/layout/fragment_trip_profile_tag.xml index b13502f5..422c25de 100644 --- a/presentation/src/main/res/layout/fragment_trip_profile_tag.xml +++ b/presentation/src/main/res/layout/fragment_trip_profile_tag.xml @@ -8,6 +8,7 @@ diff --git a/presentation/src/main/res/values/colors.xml b/presentation/src/main/res/values/colors.xml index 86d36625..f0a9e77f 100644 --- a/presentation/src/main/res/values/colors.xml +++ b/presentation/src/main/res/values/colors.xml @@ -11,7 +11,6 @@ #FFFFFF - #151515 #F3F3F6 #E4E5ED diff --git a/presentation/src/main/res/values/strings.xml b/presentation/src/main/res/values/strings.xml index 9964da6f..093d3cc8 100644 --- a/presentation/src/main/res/values/strings.xml +++ b/presentation/src/main/res/values/strings.xml @@ -30,6 +30,7 @@ 안내 확인 + 저장 인터넷 연결을 확인해주세요 @@ -239,6 +240,7 @@ - 나가기 수정하기 + 프로필을 수정했어요 선택하기 %1$d.%2$d.%3$d 시작일을 먼저 입력해 주세요