Skip to content

Commit

Permalink
[CHORE] #83 ktlint 적용
Browse files Browse the repository at this point in the history
  • Loading branch information
l5x5l committed Nov 30, 2024
1 parent 3e21c9b commit 299e2e5
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ fun PokitCheckbox(
shape = checkboxShape
)
.conditional(
condition = (onClick != null),
condition = (onClick != null)
) {
clickable(
indication = null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ fun<T> LinkCard(
Box(
modifier = Modifier
.height(94.dp)
.width(124.dp),
.width(124.dp)
) {
Image(
painter = painter,
Expand All @@ -85,7 +85,7 @@ fun<T> LinkCard(
) {
PokitCheckbox(
checked = it,
style = PokitCheckboxStyle.FILLED,
style = PokitCheckboxStyle.FILLED
)
}
}
Expand Down Expand Up @@ -210,7 +210,7 @@ fun<T> LinkCard(
.padding(2.dp),
painter = painterResource(id = R.drawable.icon_24_file),
tint = PokitTheme.colors.iconSecondary,
contentDescription = "hasMemo",
contentDescription = "hasMemo"
)
}

Expand All @@ -226,7 +226,7 @@ fun<T> LinkCard(
.padding(2.dp),
painter = painterResource(id = R.drawable.icon_24_member),
tint = PokitTheme.colors.iconSecondary,
contentDescription = "hasMemo",
contentDescription = "hasMemo"
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ fun LinkCardPreview() {
onClickItem = { value: Int -> },
bookmark = false,
hasMemo = true,
hasMember = true,
hasMember = true
)

LinkCard(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ internal fun TextIconButton(
onClick: () -> Unit,
title: String,
painter: Painter,
tintColor: Color? = PokitTheme.colors.iconPrimary
tintColor: Color? = PokitTheme.colors.iconPrimary,
) {
Row(
modifier = Modifier
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ fun LinkDetailBottomSheetContent(
)
}
}

}

Spacer(modifier = Modifier.height(12.dp))
Expand Down Expand Up @@ -130,7 +129,6 @@ fun LinkDetailBottomSheetContent(
color = PokitTheme.colors.borderTertiary
)


onClickBookmark?.let {
TextIconButton(
onClick = onClickBookmark,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ private fun LinkDetailBottomSheetPreview() {
onHideBottomSheet = { },
onClickBookmark = { },
onClickModifyLink = { },
onClickRemoveLink = { },
onClickRemoveLink = { }
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ object LinkMapper {
createdAt = data.createdAt,
isRead = data.isRead,
thumbnail = data.thumbNail,
favorites = data.isFavorite,
favorites = data.isFavorite
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ fun RemindScreen(
},
onClickItem = {
uriHandler.openUri(unReadContent.data)
},
}
)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ fun SearchScreenContainer(
show = state.linkBottomSheetType != null
) {
state.linkBottomSheetType?.let { linkBottomSheetState ->
when(linkBottomSheetState) {
when (linkBottomSheetState) {
is LinkBottomSheetState.CheckRemove -> {
TwoButtonBottomSheetContent(
title = stringResource(id = R.string.title_remove_link),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -236,24 +236,24 @@ class SearchViewModel @Inject constructor(
fun showLinkRemoveBottomSheet(link: Link) {
_state.update { state ->
state.copy(
linkBottomSheetType = LinkBottomSheetState.CheckRemove(link = link),
linkBottomSheetType = LinkBottomSheetState.CheckRemove(link = link)
)
}
}

fun showLinkDetailBottomSheet(link: Link) {
_state.update { state ->
state.copy(
linkBottomSheetType = LinkBottomSheetState.LinkDetail(link = link),
linkBottomSheetType = LinkBottomSheetState.LinkDetail(link = link)
)
}

viewModelScope.launch {
val response = getLinkUseCase.getLink(link.id.toInt())
val currentBottomSheetState = state.value.linkBottomSheetType ?: return@launch

val currentShowDetailLinkBottomSheet = (currentBottomSheetState is LinkBottomSheetState.LinkDetail)
&& (currentBottomSheetState.link.id == link.id)
val currentShowDetailLinkBottomSheet = (currentBottomSheetState is LinkBottomSheetState.LinkDetail) &&
(currentBottomSheetState.link.id == link.id)

if (response is PokitResult.Success && currentShowDetailLinkBottomSheet) {
val responseLink = Link.fromDomainLink(response.result).copy(imageUrl = link.imageUrl, isRead = true)
Expand Down

0 comments on commit 299e2e5

Please sign in to comment.