-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* UiText core/ui 모듈로 이동 feature/complete 에서도 사용하기 위함 * 목표 달성 화면 공유하기 API Job과 ShareUrl를 통한 중복 호출 방지 로직 추가 * 목표 달성 화면 사용하지 않는 onShowSnackbar 함수 제거 * 반다라트 버튼에 Throttle 적용 0.5초 동안 연속적으로 버튼의 입력이 들어올 경우 이를 처음을 제외하고 전부 취소 시킴 바텀시트가 올라올 동안 중복으로 버튼이 호출될 수 있는 상황을 방지 * chore: 사용하지 않는 의존성 제거 * 홈 화면 공유하기 버튼에도 throttle 적용 * style check success
- Loading branch information
Showing
12 changed files
with
108 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
...i/src/main/kotlin/com/nexters/bandalart/android/core/ui/extension/MultipleEventsCutter.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package com.nexters.bandalart.android.core.ui.extension | ||
|
||
internal interface MultipleEventsCutter { | ||
fun processEvent(event: () -> Unit) | ||
|
||
companion object | ||
} | ||
|
||
internal fun MultipleEventsCutter.Companion.get(): MultipleEventsCutter = | ||
MultipleEventsCutterImpl() | ||
|
||
private class MultipleEventsCutterImpl : MultipleEventsCutter { | ||
private val now: Long | ||
get() = System.currentTimeMillis() | ||
|
||
private var lastEventTimeMs: Long = 0 | ||
|
||
override fun processEvent(event: () -> Unit) { | ||
if (now - lastEventTimeMs >= 500L) { | ||
event.invoke() | ||
} | ||
lastEventTimeMs = now | ||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...alart/android/feature/home/util/UiText.kt → ...alart/android/core/ui/extension/UiText.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters