-
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
Feat : 설정화면 fcm 토큰 관련 api 연동 #216
Conversation
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.
수고많으셨습니다!
코멘트 확인 부탁드려요 👍
|
||
override fun onNewToken(token: String) { | ||
super.onNewToken(token) | ||
Timber.d("fcm_token_new: $token") | ||
SharedPreference.setFcmToken(token) |
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.
Timber
은 지워도 될거 같아용
object RetrofitObject { | ||
private const val TIME_OUT_COUNT: Long = 10 | ||
private const val TIME_OUT_COUNT: Long = 30 | ||
|
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.
넵 키워드 때문에 타임 아웃 에러나서 서버 측에서 로직 수정해주시면 다시 10으로 되돌릴 예정입니당
viewModel.setDepartment(items[viewModel.selectDepartPosition.value ?: 0]) | ||
val intent = Intent(this, MainActivity::class.java) | ||
intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP) | ||
startActivity(intent) | ||
finish() |
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.
네 이 부분 사용해보셨는지 모르겠는데 불편하기도 하고, 학과가 바꼈는지 확인이 안 되기에 finish처리만 했습니다.
if (viewModel.isFirstLaunch.value == true) { | ||
viewModel.setFirstLaunch(false) | ||
val intent = Intent(this@KeywordActivity, OnboardingPermissionActivity::class.java) | ||
startActivity(intent) | ||
} |
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.
👍
//prefs.edit().putString("fcm_token", token).commit() | ||
Timber.d("fcm_token: $token") | ||
SharedPreference.setFcmToken(token) | ||
}) |
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.
여기도 이제 Timber
은 지워도 될거같아요!
|
||
override fun initStartView() { | ||
binding.tvSettingAppVersion.text = getAppVersion() | ||
setResultKeyword() | ||
} |
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.
넴 고고 합시다
viewModel.myDepartment.observe(viewLifecycleOwner) { department -> | ||
binding.tvSettingDepartment.text = department | ||
} | ||
|
||
viewModel.myTopics.observe(viewLifecycleOwner) { myTopics -> | ||
topics = myTopics | ||
} | ||
|
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.
it
을 명시할때 department
, myTopics
라 약간 혼동이 옵니다
통일을 하는게 좋을거 같아요
_isLoading.postValue(true) | ||
viewModelScope.launch { | ||
when (val result = settingRepository.updateUserDepartment( |
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.
개인적으로 코드가 viewModelScope.launch
처럼 길어질 때 코드 사이에 공백이 있는게 보기 편하더라구요!
효율적인 부분에서는 잘 모르겠어서 의견 말해주시면 컨벤션을 맞추는게 좋을거 같습니다
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 kotlinx.coroutines.launch | ||
import timber.log.Timber | ||
|
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.
수고하셨습니다! 👍
📮 관련 이슈
✍️ 구현 내용
finish()
처리만 해서 다시 설정화면으로 돌아오도록 수정했습니다.📷 구현 영상
서버 통신 200 로그로 구현 영상 대체합니다✔️ 확인 사항