-
Notifications
You must be signed in to change notification settings - Fork 0
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
#273 [feat] 앱 버전이 맞지 않을 경우, 업데이트 화면 뜨게 하기 #274
#273 [feat] 앱 버전이 맞지 않을 경우, 업데이트 화면 뜨게 하기 #274
Conversation
…Impl, Service, UseCase)
… 메인으로 띄울지, 버전 업데이트 안내문구 띄울지 결정
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
고생하셨습니다
코멘트 참고해주세요!
+) 이슈명을 수정하는 게 어떨까요..?
+) 커밋 컨벤션이 안 맞네요 ㅎ 커밋타입도 고려해서 커밋해주세요!
app/src/main/java/com/sopt/peekabookaos/domain/entity/Version.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/sopt/peekabookaos/presentation/forceUpdate/ForceUpdateActivity.kt
Outdated
Show resolved
Hide resolved
@Serializable | ||
data class VersionResponse( | ||
val imageUrl: String, | ||
val iosForceVersion: String, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
현재 우리는 iOSForceVersion이라는 변수가 필요하지 않습니다!
json에는 ignoreUnknownKey
라는 키워드가 있는데 다음에 공부해서 리팩토링 해봅시다
|
||
@Serializable | ||
data class VersionResponse( | ||
val imageUrl: String, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
imageUrl이 현재 뷰에는 쓰이지 않는데 nullable 변수인지 서버한테 물어보면 좋을 것 같네요
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
꼼꼼한 핃백 감사합니다
app/src/main/java/com/sopt/peekabookaos/presentation/splash/SplashActivity.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/sopt/peekabookaos/presentation/splash/SplashActivity.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/sopt/peekabookaos/presentation/splash/SplashViewModel.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/sopt/peekabookaos/presentation/splash/SplashActivity.kt
Outdated
Show resolved
Hide resolved
private val _versionName: MutableLiveData<String> = MutableLiveData() | ||
val versionName: LiveData<String> = _versionName | ||
private val _isVersionStatus = MutableLiveData(false) | ||
val isVersionStatus: LiveData<Boolean> = _isVersionStatus |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UiState라는 데이터클래스를 만들어서 변수를 하나에 관리하는 건 어떨까요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
당장은 여기에서만 쓰이니 안만드는게 좋겠다고 생각했는데, 나중엔 다른 곳에서도 쓰일 수도 있겠네요..!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
음 .. 개인적으론 코딩스타일인 것 같아서 다음에 uiState 공부하고 적용해보면 좋을 것 같아요
app/src/main/java/com/sopt/peekabookaos/presentation/splash/SplashActivity.kt
Outdated
Show resolved
Hide resolved
private val _isVersionStatus = MutableLiveData(false) | ||
val isVersionStatus: LiveData<Boolean> = _isVersionStatus |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isVersionStatus보다는 isForceUpdate가 더 직관적인 것 같은데 어떻게 생각하시나요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
서버 통신 변수명이니까 status가 들어가는 것이 좋아보여 isForceUpdateStatus로 변경했습니다
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
강희언니 수고많았어 영주언니 꼼꼼한 리뷰 보고 많이 배우고 갑니다..!!!
import retrofit2.http.GET | ||
|
||
interface ForceUpdateService { | ||
@GET("user/v1/version") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍👍👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
고생선배.... 우리 뷰모델 라이브데이터 써줘잉
app/src/main/java/com/sopt/peekabookaos/presentation/forceUpdate/ForceUpdateActivity.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/sopt/peekabookaos/presentation/forceUpdate/ForceUpdateViewModel.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/sopt/peekabookaos/presentation/splash/SplashActivity.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/sopt/peekabookaos/presentation/splash/SplashActivity.kt
Show resolved
Hide resolved
var latestVersion = Version() | ||
private val _isForceUpdateStatus = MutableLiveData(false) | ||
val isForceUpdateStatus: LiveData<Boolean> = _isForceUpdateStatus | ||
lateinit var majorVersion: String | ||
lateinit var minorVersion: String |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
public인 이유가 있나요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
로직 변경해서 바뀐 변수들은 private으로 처리했습니다
app/src/main/java/com/sopt/peekabookaos/presentation/splash/SplashActivity.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/sopt/peekabookaos/presentation/splash/SplashActivity.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/com/sopt/peekabookaos/presentation/splash/SplashActivity.kt
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
고생했어~~
관련 이슈
작업 사진/동영상 (선택)
KakaoTalk_20231105_234405670.mp4
작업한 내용
PR 포인트