Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IDLE-511] 센터 관리자 인증 상태에서 앱 재실행시 인증 대기 화면으로 가지 않던 버그 수정 #154

Merged
merged 2 commits into from
Nov 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ fun LocalDateTime.formatRelativeDateTime(): String {
return when {
this.isAfter(nowInSeoul) -> "미래"

ChronoUnit.DAYS.between(this.toLocalDate(), nowInSeoul.toLocalDate()) < 1 -> {
ChronoUnit.HOURS.between(this, nowInSeoul) < 24 -> {
// 하루 이내일 경우: "오후 XX시 XX분"
val formatter = DateTimeFormatter.ofPattern("a hh:mm").withZone(seoulZone)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ import com.idle.domain.model.error.HttpResponseException
import com.idle.domain.model.profile.CenterManagerAccountStatus
import com.idle.domain.usecase.auth.GetAccessTokenUseCase
import com.idle.domain.usecase.auth.GetUserTypeUseCase
import com.idle.domain.usecase.chatting.ConnectWebSocketUseCase
import com.idle.domain.usecase.chatting.DisconnectWebSocketUseCase
import com.idle.domain.usecase.config.GetForceUpdateInfoUseCase
import com.idle.domain.usecase.profile.GetCenterStatusUseCase
import com.idle.domain.usecase.profile.GetMyCenterProfileUseCase
Expand Down Expand Up @@ -96,12 +94,8 @@ class MainViewModel @Inject constructor(
return@launch
}

when (userRole) {
UserType.CENTER.apiValue -> getMyCenterProfileUseCase().onFailure {
return@launch
}

UserType.WORKER.apiValue -> getMyWorkerProfileUseCase().onFailure {
if (userRole == UserType.WORKER.apiValue) {
getMyWorkerProfileUseCase().onFailure {
return@launch
}
}
Expand Down