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

#273 [feat] 앱 버전이 맞지 않을 경우, 업데이트 화면 뜨게 하기 #274

Merged

Conversation

stellar-halo
Copy link
Member

@stellar-halo stellar-halo commented Nov 2, 2023

관련 이슈

작업 사진/동영상 (선택)

KakaoTalk_20231105_234405670.mp4

작업한 내용

  • 스플래시 화면에서 앱 버전이 맞지 않을 경우, 업데이트 화면으로 뜨게 하여 플레이 스토어로 연결하기

PR 포인트

  • 제 모든 코드가 요주의 인물 같습니다.. 특별히 새롭게 쓰인 것은 없습니다.
  • 코드상으론 문제 없이 켜져야 해서, 다른 값으로 테스트한 화면입니다.

@stellar-halo stellar-halo added feat 새로운 기능 추가 Pull Request🔥 풀리퀘 날림! 강희🐬 강희가 작업함! labels Nov 2, 2023
@stellar-halo stellar-halo self-assigned this Nov 2, 2023
Copy link
Contributor

@2zerozu 2zerozu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨습니다
코멘트 참고해주세요!

+) 이슈명을 수정하는 게 어떨까요..?
+) 커밋 컨벤션이 안 맞네요 ㅎ 커밋타입도 고려해서 커밋해주세요!

@Serializable
data class VersionResponse(
val imageUrl: String,
val iosForceVersion: String,
Copy link
Contributor

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,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

imageUrl이 현재 뷰에는 쓰이지 않는데 nullable 변수인지 서버한테 물어보면 좋을 것 같네요

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

꼼꼼한 핃백 감사합니다

Comment on lines 20 to 23
private val _versionName: MutableLiveData<String> = MutableLiveData()
val versionName: LiveData<String> = _versionName
private val _isVersionStatus = MutableLiveData(false)
val isVersionStatus: LiveData<Boolean> = _isVersionStatus
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UiState라는 데이터클래스를 만들어서 변수를 하나에 관리하는 건 어떨까요?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

당장은 여기에서만 쓰이니 안만드는게 좋겠다고 생각했는데, 나중엔 다른 곳에서도 쓰일 수도 있겠네요..!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

음 .. 개인적으론 코딩스타일인 것 같아서 다음에 uiState 공부하고 적용해보면 좋을 것 같아요

@2zerozu 2zerozu changed the title #273[feat] 앱 버전이 맞지 않을 경우, 업데이트 화면 뜨게 하기 #273 [feat] 앱 버전이 맞지 않을 경우, 업데이트 화면 뜨게 하기 Nov 3, 2023
Comment on lines 22 to 23
private val _isVersionStatus = MutableLiveData(false)
val isVersionStatus: LiveData<Boolean> = _isVersionStatus
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isVersionStatus보다는 isForceUpdate가 더 직관적인 것 같은데 어떻게 생각하시나요?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

서버 통신 변수명이니까 status가 들어가는 것이 좋아보여 isForceUpdateStatus로 변경했습니다

Copy link
Contributor

@hajeong67 hajeong67 left a 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")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍👍👍

Copy link
Contributor

@2zerozu 2zerozu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생선배.... 우리 뷰모델 라이브데이터 써줘잉

Comment on lines 21 to 25
var latestVersion = Version()
private val _isForceUpdateStatus = MutableLiveData(false)
val isForceUpdateStatus: LiveData<Boolean> = _isForceUpdateStatus
lateinit var majorVersion: String
lateinit var minorVersion: String
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

public인 이유가 있나요?

Copy link
Member Author

@stellar-halo stellar-halo Nov 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

로직 변경해서 바뀐 변수들은 private으로 처리했습니다

app/src/main/res/layout/activity_force_update.xml Outdated Show resolved Hide resolved
Copy link
Contributor

@2zerozu 2zerozu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생했어~~

@stellar-halo stellar-halo merged commit 830ad95 into develop Nov 6, 2023
1 check passed
@stellar-halo stellar-halo deleted the feature/#273-feat-bookshelf-version-update-notification branch November 6, 2023 05:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat 새로운 기능 추가 Pull Request🔥 풀리퀘 날림! 강희🐬 강희가 작업함!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[feat] 앱 버전이 맞지 않을 경우, 업데이트 화면 뜨게 하기
3 participants