From 299e2e584cfdb295fe5a32a88a3c8c34d6420778 Mon Sep 17 00:00:00 2001 From: yunsehwan Date: Sat, 30 Nov 2024 18:33:55 +0900 Subject: [PATCH] =?UTF-8?q?[CHORE]=20#83=20ktlint=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../core/ui/components/atom/checkbox/PokitCheckbox.kt | 2 +- .../pokit/core/ui/components/block/linkcard/LinkCard.kt | 8 ++++---- .../pokit/core/ui/components/block/linkcard/Preview.kt | 2 +- .../ui/components/block/texticonbutton/TextIconButton.kt | 2 +- .../linkdetailbottomsheet/LinkDetailBottomSheetContent.kt | 2 -- .../components/template/linkdetailbottomsheet/Preview.kt | 2 +- .../java/pokitmons/pokit/data/mapper/link/LinkMapper.kt | 2 +- .../main/java/pokitmons/pokit/home/remind/RemindScreen.kt | 2 +- .../src/main/java/pokitmons/pokit/search/SearchScreen.kt | 2 +- .../main/java/pokitmons/pokit/search/SearchViewModel.kt | 8 ++++---- 10 files changed, 15 insertions(+), 17 deletions(-) diff --git a/core/ui/src/main/java/pokitmons/pokit/core/ui/components/atom/checkbox/PokitCheckbox.kt b/core/ui/src/main/java/pokitmons/pokit/core/ui/components/atom/checkbox/PokitCheckbox.kt index 5b3f04d..1462af5 100644 --- a/core/ui/src/main/java/pokitmons/pokit/core/ui/components/atom/checkbox/PokitCheckbox.kt +++ b/core/ui/src/main/java/pokitmons/pokit/core/ui/components/atom/checkbox/PokitCheckbox.kt @@ -46,7 +46,7 @@ fun PokitCheckbox( shape = checkboxShape ) .conditional( - condition = (onClick != null), + condition = (onClick != null) ) { clickable( indication = null, diff --git a/core/ui/src/main/java/pokitmons/pokit/core/ui/components/block/linkcard/LinkCard.kt b/core/ui/src/main/java/pokitmons/pokit/core/ui/components/block/linkcard/LinkCard.kt index 3b4ae7d..d3fa579 100644 --- a/core/ui/src/main/java/pokitmons/pokit/core/ui/components/block/linkcard/LinkCard.kt +++ b/core/ui/src/main/java/pokitmons/pokit/core/ui/components/block/linkcard/LinkCard.kt @@ -64,7 +64,7 @@ fun LinkCard( Box( modifier = Modifier .height(94.dp) - .width(124.dp), + .width(124.dp) ) { Image( painter = painter, @@ -85,7 +85,7 @@ fun LinkCard( ) { PokitCheckbox( checked = it, - style = PokitCheckboxStyle.FILLED, + style = PokitCheckboxStyle.FILLED ) } } @@ -210,7 +210,7 @@ fun LinkCard( .padding(2.dp), painter = painterResource(id = R.drawable.icon_24_file), tint = PokitTheme.colors.iconSecondary, - contentDescription = "hasMemo", + contentDescription = "hasMemo" ) } @@ -226,7 +226,7 @@ fun LinkCard( .padding(2.dp), painter = painterResource(id = R.drawable.icon_24_member), tint = PokitTheme.colors.iconSecondary, - contentDescription = "hasMemo", + contentDescription = "hasMemo" ) } } diff --git a/core/ui/src/main/java/pokitmons/pokit/core/ui/components/block/linkcard/Preview.kt b/core/ui/src/main/java/pokitmons/pokit/core/ui/components/block/linkcard/Preview.kt index 78597ec..bf722e9 100644 --- a/core/ui/src/main/java/pokitmons/pokit/core/ui/components/block/linkcard/Preview.kt +++ b/core/ui/src/main/java/pokitmons/pokit/core/ui/components/block/linkcard/Preview.kt @@ -36,7 +36,7 @@ fun LinkCardPreview() { onClickItem = { value: Int -> }, bookmark = false, hasMemo = true, - hasMember = true, + hasMember = true ) LinkCard( diff --git a/core/ui/src/main/java/pokitmons/pokit/core/ui/components/block/texticonbutton/TextIconButton.kt b/core/ui/src/main/java/pokitmons/pokit/core/ui/components/block/texticonbutton/TextIconButton.kt index a1d15ce..8a49e33 100644 --- a/core/ui/src/main/java/pokitmons/pokit/core/ui/components/block/texticonbutton/TextIconButton.kt +++ b/core/ui/src/main/java/pokitmons/pokit/core/ui/components/block/texticonbutton/TextIconButton.kt @@ -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 diff --git a/core/ui/src/main/java/pokitmons/pokit/core/ui/components/template/linkdetailbottomsheet/LinkDetailBottomSheetContent.kt b/core/ui/src/main/java/pokitmons/pokit/core/ui/components/template/linkdetailbottomsheet/LinkDetailBottomSheetContent.kt index 89832ab..ef36741 100644 --- a/core/ui/src/main/java/pokitmons/pokit/core/ui/components/template/linkdetailbottomsheet/LinkDetailBottomSheetContent.kt +++ b/core/ui/src/main/java/pokitmons/pokit/core/ui/components/template/linkdetailbottomsheet/LinkDetailBottomSheetContent.kt @@ -75,7 +75,6 @@ fun LinkDetailBottomSheetContent( ) } } - } Spacer(modifier = Modifier.height(12.dp)) @@ -130,7 +129,6 @@ fun LinkDetailBottomSheetContent( color = PokitTheme.colors.borderTertiary ) - onClickBookmark?.let { TextIconButton( onClick = onClickBookmark, diff --git a/core/ui/src/main/java/pokitmons/pokit/core/ui/components/template/linkdetailbottomsheet/Preview.kt b/core/ui/src/main/java/pokitmons/pokit/core/ui/components/template/linkdetailbottomsheet/Preview.kt index 2c4fc79..3535d39 100644 --- a/core/ui/src/main/java/pokitmons/pokit/core/ui/components/template/linkdetailbottomsheet/Preview.kt +++ b/core/ui/src/main/java/pokitmons/pokit/core/ui/components/template/linkdetailbottomsheet/Preview.kt @@ -22,7 +22,7 @@ private fun LinkDetailBottomSheetPreview() { onHideBottomSheet = { }, onClickBookmark = { }, onClickModifyLink = { }, - onClickRemoveLink = { }, + onClickRemoveLink = { } ) } } diff --git a/data/src/main/java/pokitmons/pokit/data/mapper/link/LinkMapper.kt b/data/src/main/java/pokitmons/pokit/data/mapper/link/LinkMapper.kt index b0ad05a..2e6b3c0 100644 --- a/data/src/main/java/pokitmons/pokit/data/mapper/link/LinkMapper.kt +++ b/data/src/main/java/pokitmons/pokit/data/mapper/link/LinkMapper.kt @@ -20,7 +20,7 @@ object LinkMapper { createdAt = data.createdAt, isRead = data.isRead, thumbnail = data.thumbNail, - favorites = data.isFavorite, + favorites = data.isFavorite ) } } diff --git a/feature/home/src/main/java/pokitmons/pokit/home/remind/RemindScreen.kt b/feature/home/src/main/java/pokitmons/pokit/home/remind/RemindScreen.kt index c788f89..35890e6 100644 --- a/feature/home/src/main/java/pokitmons/pokit/home/remind/RemindScreen.kt +++ b/feature/home/src/main/java/pokitmons/pokit/home/remind/RemindScreen.kt @@ -211,7 +211,7 @@ fun RemindScreen( }, onClickItem = { uriHandler.openUri(unReadContent.data) - }, + } ) } } diff --git a/feature/search/src/main/java/pokitmons/pokit/search/SearchScreen.kt b/feature/search/src/main/java/pokitmons/pokit/search/SearchScreen.kt index 687b828..300ed29 100644 --- a/feature/search/src/main/java/pokitmons/pokit/search/SearchScreen.kt +++ b/feature/search/src/main/java/pokitmons/pokit/search/SearchScreen.kt @@ -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), diff --git a/feature/search/src/main/java/pokitmons/pokit/search/SearchViewModel.kt b/feature/search/src/main/java/pokitmons/pokit/search/SearchViewModel.kt index b758992..422b1c9 100644 --- a/feature/search/src/main/java/pokitmons/pokit/search/SearchViewModel.kt +++ b/feature/search/src/main/java/pokitmons/pokit/search/SearchViewModel.kt @@ -236,7 +236,7 @@ class SearchViewModel @Inject constructor( fun showLinkRemoveBottomSheet(link: Link) { _state.update { state -> state.copy( - linkBottomSheetType = LinkBottomSheetState.CheckRemove(link = link), + linkBottomSheetType = LinkBottomSheetState.CheckRemove(link = link) ) } } @@ -244,7 +244,7 @@ class SearchViewModel @Inject constructor( fun showLinkDetailBottomSheet(link: Link) { _state.update { state -> state.copy( - linkBottomSheetType = LinkBottomSheetState.LinkDetail(link = link), + linkBottomSheetType = LinkBottomSheetState.LinkDetail(link = link) ) } @@ -252,8 +252,8 @@ class SearchViewModel @Inject constructor( 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)