-
Notifications
You must be signed in to change notification settings - Fork 5
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
러닝 상태를 관리하는 RunningDataManager를 모듈로 분리 #77
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.
고생 하셨어용~~!
@@ -72,7 +75,7 @@ internal class RunningActivity : | |||
} | |||
|
|||
observeStateOnMapReady() | |||
naverMap.addOnCameraChangeListener { reason, animated -> | |||
naverMap.addOnCameraChangeListener { reason, _ -> | |||
if (reason == CameraUpdate.REASON_GESTURE) { |
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.
네이버 맵 자체에 CameraChangeListener라는게 있군용..!!! CameraUpdate.REASON_GESTURE 요 속성도 네이버 맵 SDK의 속성인가요??
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.
넵 이 함수는 병희님이 작성하셨던 부분인데 맞는 것 같습니다
fun RunningHistoryModel.toRunningHistoryUiModel() = | ||
RunningHistoryUiModel( | ||
historyId = historyId, | ||
date = startedAt, | ||
startedAt = startedAt, | ||
finishedAt = finishedAt, | ||
totalRunningTime = totalRunningTime, | ||
pace = pace, | ||
totalDistance = totalDistance | ||
) | ||
|
||
fun RunningHistoryModel.toRunningHistory() = | ||
RunningHistory( | ||
historyId = historyId, | ||
startedAt = startedAt, | ||
finishedAt = finishedAt, | ||
totalRunningTime = totalRunningTime, | ||
pace = pace, | ||
totalDistance = totalDistance | ||
) |
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.
model, Response, UiModel간 타입 캐스팅 확장함수들은 각 모델들의 클래스파일에 같이 존재하고 있는 것으로 기억하는데 요 친구들만 이렇게 분리하신 이유가 있으신가요??!
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.
이 아이들은 모듈 간 분리 전에 의존성만 빼는 과정에서 나온 애들인데요
분리 되어야 하는 핵심 로직에서 Ui 모델 대신에 해당 모듈에서 사용할 모델을 따로 만들어서 교체해줬고 이후 커밋에서 피처 모듈에 넣었습니다
runningdata/build.gradle
Outdated
targetCompatibility JavaVersion.VERSION_1_8 | ||
} | ||
kotlinOptions { | ||
jvmTarget = '1.8' |
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.
넵 피드백 감사합니다!
runningdata/build.gradle
Outdated
buildTypes { | ||
release { | ||
minifyEnabled false | ||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' |
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.
넵 새롭게 만들 모듈이라 기본 값으로 작은 따옴표가 붙어있네요 내일 병희님 컨펌 받으면서 수정할게욧
runningdata/build.gradle
Outdated
} | ||
|
||
android { | ||
namespace 'com.whyranoid.runningdata' |
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.
요것도 큰 따옴표..!
runningdata/build.gradle
Outdated
id 'com.android.library' | ||
id 'org.jetbrains.kotlin.android' |
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.
요것도 큰 따옴표..!
|
||
data class Paused(override val runningData: RunningData) : RunningState | ||
fun getInstance(): RunningDataManager { | ||
return INSTANCE ?: RunningDataManager().also { |
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.
크... also 깔끔하네용~!
settings.gradle
Outdated
include ':data' | ||
include ':presentation' | ||
include ':signin' | ||
include ':runningdata' |
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.
그러고 보니 세팅 그레들쪽도 가능하면 ' ' -> " " 로 변경해볼까용?
6cccf06
to
a92fc56
Compare
Co-authored-by: bngsh <[email protected]>
Co-authored-by: bngsh <[email protected]>
a92fc56
to
5700fe6
Compare
Co-authored-by: bngsh <[email protected]>
Co-authored-by: bngsh <[email protected]>
5700fe6
to
8b9c7df
Compare
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.
모듈 분리 고생하셨어요!
date = startedAt, | ||
startedAt = startedAt, |
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.
같은 startedAt이라는 데이터를 받는데 date와 startedAt이 다른 이유는 무엇인가요?
|
||
import android.content.Context | ||
|
||
object PxDpUtil { | ||
object UnitConverters { |
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.
저번에 말했던 걸 반영해주셨네요!
data class RunningFinishData( | ||
val runningHistory: RunningHistoryModel, | ||
val runningPositionList: List<List<RunningPosition>> | ||
) : java.io.Serializable |
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.
모듈을 분리해서 외부에 지원하기 위해 다른 의존성을 최대한 배제하려고 의존성을 제거 했습니다.
😎 작업 내용
🧐 변경된 내용
🥳 동작 화면
🤯 이슈 번호
기타