Skip to content

Commit

Permalink
[FEAT]#111: Lint 적용
Browse files Browse the repository at this point in the history
  • Loading branch information
flash159483 committed Aug 19, 2024
1 parent 1d1ee94 commit b6f5510
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 21 deletions.
2 changes: 1 addition & 1 deletion core/ui/src/main/kotlin/com/bff/wespot/model/ToastState.kt
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ data class ToastState(
val type: WSToastType,
) {
constructor() :
this(false, com.bff.wespot.designsystem.R.string.cancel, WSToastType.Success)
this(false, com.bff.wespot.designsystem.R.string.cancel, WSToastType.Success)
}
7 changes: 3 additions & 4 deletions core/ui/src/main/kotlin/com/bff/wespot/ui/CaptureBitmap.kt
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ fun CaptureBitmap(
Box(
modifier = Modifier
.wrapContentSize()
.background(WeSpotThemeManager.colors.backgroundColor)
.background(WeSpotThemeManager.colors.backgroundColor),
) {
content.invoke()
}
Expand All @@ -66,7 +66,7 @@ fun saveBitmap(context: Context, bitmap: Bitmap, filename: String = DEFAULT_FILE

val imageUri: Uri? = contentResolver.insert(
MediaStore.Images.Media.EXTERNAL_CONTENT_URI,
contentValues
contentValues,
)

return imageUri.also {
Expand All @@ -78,6 +78,5 @@ fun saveBitmap(context: Context, bitmap: Bitmap, filename: String = DEFAULT_FILE
}
}


@JvmField
val DEFAULT_FILENAME = "${System.currentTimeMillis()}.png"
val DEFAULT_FILENAME = "${System.currentTimeMillis()}.png"
4 changes: 2 additions & 2 deletions core/ui/src/main/kotlin/com/bff/wespot/ui/TopToast.kt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ fun TopToast(
modifier = Modifier
.fillMaxSize()
.padding(top = 12.dp),
contentAlignment = Alignment.TopCenter
contentAlignment = Alignment.TopCenter,
) {
WSToast(
text = message,
Expand All @@ -30,4 +30,4 @@ fun TopToast(
closeToast = closeToast,
)
}
}
}
8 changes: 4 additions & 4 deletions core/ui/src/main/kotlin/com/bff/wespot/util/ModifierUtil.kt
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ fun Modifier.clickableSingle(
enabled: Boolean = true,
onClickLabel: String? = null,
role: Role? = null,
onClick: () -> Unit
onClick: () -> Unit,
) = composed(
inspectorInfo = debugInspectorInfo {
name = "clickable"
properties["enabled"] = enabled
properties["onClickLabel"] = onClickLabel
properties["role"] = role
properties["onClick"] = onClick
}
},
) {
multipleEventsCutter { manager ->
Modifier.clickable(
Expand All @@ -52,7 +52,7 @@ fun Modifier.clickableSingle(
onClick = { manager.processEvent { onClick() } },
role = role,
indication = LocalIndication.current,
interactionSource = remember { MutableInteractionSource() }
interactionSource = remember { MutableInteractionSource() },
)
}
}
}
12 changes: 6 additions & 6 deletions core/ui/src/main/kotlin/com/bff/wespot/util/MultiClickCutter.kt
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ interface MultipleEventsCutterManager {

@OptIn(FlowPreview::class)
@Composable
fun <T>multipleEventsCutter(
content: @Composable (MultipleEventsCutterManager) -> T
) : T {
fun <T> multipleEventsCutter(
content: @Composable (MultipleEventsCutterManager) -> T,
): T {
val debounceState = remember {
MutableSharedFlow<() -> Unit>(
replay = 0,
extraBufferCapacity = 1,
onBufferOverflow = BufferOverflow.DROP_OLDEST
onBufferOverflow = BufferOverflow.DROP_OLDEST,
)
}

Expand All @@ -30,7 +30,7 @@ fun <T>multipleEventsCutter(
override fun processEvent(event: () -> Unit) {
debounceState.tryEmit(event)
}
}
},
)

LaunchedEffect(true) {
Expand All @@ -42,4 +42,4 @@ fun <T>multipleEventsCutter(
}

return result
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@ fun SchoolScreen(
}
}
}

}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ fun ReservedMessageScreen(
toastType = WSToastType.Success,
showToast = showToast,
) {
showToast = false
showToast = false
}

LaunchedEffect(Unit) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,12 +264,11 @@ fun MessageEditScreen(
TopToast(
message = stringResource(R.string.toast_error_name_edit),
toastType = WSToastType.Error,
showToast = toast
showToast = toast,
) {
toast = false
}


LaunchedEffect(Unit) {
action(SendAction.OnMessageEditScreenEntered(navArgs.isReservedMessage, navArgs.messageId))
}
Expand Down

0 comments on commit b6f5510

Please sign in to comment.