-
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
Refactor/android/week6 day1 전체적인 리팩토링, 더블 클릭 방지, 다크 모드 간단 대응 #235
Refactor/android/week6 day1 전체적인 리팩토링, 더블 클릭 방지, 다크 모드 간단 대응 #235
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.
문서화 작업으로도 바쁘실 텐데 고생 많으셨습니다! LGTM~!
} | ||
|
||
private fun requestChangeFollowStatus() { | ||
clickEvent.setClickEvent(viewModelScope, 2000L) { userStatus -> |
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.
저희 setClickEvent 할 때 duration으로 THROTTLE_DURATION
값으로 주고 있는데 여기서는 2000L으로 특별히 설정하신 이유가 있나용?
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.
기본적으로 팔로우 클릭 후 다시 상태들을 업데이트 하는데 fetch 하기 전에 1초가 끝나는 경우가 있어서 여유롭게 2초로 막아놨습니다!!
uiScope: CoroutineScope, | ||
windowDuration: Long = THROTTLE_DURATION, | ||
onClick: suspend (value: T) -> Unit | ||
) { | ||
throttleFirst(windowDuration) | ||
.onEach { onClick.invoke(it) } | ||
.launchIn(uiScope) | ||
} |
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에서 sharedFlow를 통해서 throttleFirst 일반화한 것 좋은 것 같습니다!
클릭 이벤트마다 sharedFlow를 viewModel에 가지고 있어야 하는데 이 방법에 대해서 다같이 이야기 해보면 좋을 것 같네용 👍👍
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.
저도 쓰겠습니당
<resources> | ||
<color name="black">#FFFFFFFF</color> | ||
<color name="white">#FF000000</color> | ||
<color name="transparent">#00000000</color> | ||
|
||
<color name="event_color_red">#FF6565</color> | ||
<color name="event_color_orange">#FFC165</color> | ||
<color name="event_color_green">#7BFF65</color> | ||
<color name="event_color_blue">#65A3FF</color> | ||
<color name="event_color_purple">#D765FF</color> | ||
<color name="event_color_checked">#6750A4</color> | ||
|
||
<color name="event_color_warning">#B11212</color> | ||
<color name="blue">#FF0000FF</color> | ||
<color name="red">#FFFF0000</color> | ||
<color name="green">#4DA430</color> | ||
<color name="calendar_background_purple">#E8DEF8</color> | ||
<color name="background_splash">#FF7374E2</color> | ||
|
||
<color name="grey1">#4F4F4F</color> | ||
<color name="grey2">#828282</color> | ||
<color name="grey3">#E0E0E0</color> | ||
<color name="grey4">#F5F5F7</color> | ||
<color name="grey5">#30828282</color> | ||
|
||
<color name="notification_highlight">#FFFBE4</color> | ||
|
||
<color name="loading_background">#30000000</color> |
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.
네이밍에 대해 좀 더 같이 고민하고 지으면 좋을 것 같애요!!
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.
onSurface같은 이름으로 바꿔야 할 것 같아요
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.
밤늦게 수고 많으셨습니당..
uiScope: CoroutineScope, | ||
windowDuration: Long = THROTTLE_DURATION, | ||
onClick: suspend (value: T) -> Unit | ||
) { | ||
throttleFirst(windowDuration) | ||
.onEach { onClick.invoke(it) } | ||
.launchIn(uiScope) | ||
} |
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.
저도 쓰겠습니당
<resources> | ||
<color name="black">#FFFFFFFF</color> | ||
<color name="white">#FF000000</color> | ||
<color name="transparent">#00000000</color> | ||
|
||
<color name="event_color_red">#FF6565</color> | ||
<color name="event_color_orange">#FFC165</color> | ||
<color name="event_color_green">#7BFF65</color> | ||
<color name="event_color_blue">#65A3FF</color> | ||
<color name="event_color_purple">#D765FF</color> | ||
<color name="event_color_checked">#6750A4</color> | ||
|
||
<color name="event_color_warning">#B11212</color> | ||
<color name="blue">#FF0000FF</color> | ||
<color name="red">#FFFF0000</color> | ||
<color name="green">#4DA430</color> | ||
<color name="calendar_background_purple">#E8DEF8</color> | ||
<color name="background_splash">#FF7374E2</color> | ||
|
||
<color name="grey1">#4F4F4F</color> | ||
<color name="grey2">#828282</color> | ||
<color name="grey3">#E0E0E0</color> | ||
<color name="grey4">#F5F5F7</color> | ||
<color name="grey5">#30828282</color> | ||
|
||
<color name="notification_highlight">#FFFBE4</color> | ||
|
||
<color name="loading_background">#30000000</color> |
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.
onSurface같은 이름으로 바꿔야 할 것 같아요
개요
설명
구현사진