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

Refactor/android/week6 day1 전체적인 리팩토링, 더블 클릭 방지, 다크 모드 간단 대응 #235

Merged
merged 23 commits into from
Dec 14, 2023

Conversation

agfalcon
Copy link
Collaborator

개요

  • 전체적인 리팩토링, 더블 클릭 방지, 다크 모드 간단 대응

설명

  • 다크 모드 간단 대응
    • night-values에 color 추가
    • vector 모두 color resource로 변경
    • 일부분 직접 배경 정한 곳은 고쳐지지 않아서 각자 대응하면 될 것 같습니다.
  • ViewHolder에서 더블 클릭 방지할 수 있는 함수 생성
  • 더블 클릭 방지 구현
  • 전체적인 리팩토링
  • 노션 hot fix 대응
    • 프로필 가로 전환 시 문제 해결
    • 인터넷 안될 때 유저프로필 안되는 문제 해결
  • 예외처리 상세화

구현사진

image

@agfalcon agfalcon added Android 안드로이드 Feat 기능 Bug Refactor labels Dec 13, 2023
@agfalcon agfalcon self-assigned this Dec 13, 2023
Copy link
Collaborator

@p-chanmin p-chanmin left a 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 ->
Copy link
Collaborator

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으로 특별히 설정하신 이유가 있나용?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

기본적으로 팔로우 클릭 후 다시 상태들을 업데이트 하는데 fetch 하기 전에 1초가 끝나는 경우가 있어서 여유롭게 2초로 막아놨습니다!!

Comment on lines +66 to +74
uiScope: CoroutineScope,
windowDuration: Long = THROTTLE_DURATION,
onClick: suspend (value: T) -> Unit
) {
throttleFirst(windowDuration)
.onEach { onClick.invoke(it) }
.launchIn(uiScope)
}
Copy link
Collaborator

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에 가지고 있어야 하는데 이 방법에 대해서 다같이 이야기 해보면 좋을 것 같네용 👍👍

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

넵넵 좋습니다!!

Copy link
Collaborator

Choose a reason for hiding this comment

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

저도 쓰겠습니당

Comment on lines +2 to +29
<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>
Copy link
Collaborator

Choose a reason for hiding this comment

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

다크모드 👍👍

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

네이밍에 대해 좀 더 같이 고민하고 지으면 좋을 것 같애요!!

Copy link
Collaborator

Choose a reason for hiding this comment

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

onSurface같은 이름으로 바꿔야 할 것 같아요

Copy link
Collaborator

@LeeHaiLim LeeHaiLim 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 +66 to +74
uiScope: CoroutineScope,
windowDuration: Long = THROTTLE_DURATION,
onClick: suspend (value: T) -> Unit
) {
throttleFirst(windowDuration)
.onEach { onClick.invoke(it) }
.launchIn(uiScope)
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

저도 쓰겠습니당

Comment on lines +2 to +29
<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>
Copy link
Collaborator

Choose a reason for hiding this comment

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

onSurface같은 이름으로 바꿔야 할 것 같아요

@LeeHaiLim LeeHaiLim merged commit 3823d5d into boostcampwm2023:dev Dec 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Android 안드로이드 Bug Feat 기능 Refactor
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

3 participants