Skip to content

Commit

Permalink
[CHORE][#13] MyPage detekt 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
josushell committed Feb 11, 2024
1 parent dbfdbd7 commit af47be5
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ internal fun MyPageScreen(
myAlbumImageList = uiState.myAlbumImageList,
onMoreBtnClick = onMoreBtnClick,
onNavigateToMyAlbumImage = onNavigateToMyAlbumImage,
)
)
}
}

Expand All @@ -117,7 +117,7 @@ internal fun MyPageContent(
myAlbumImageList: List<MyAlbum>,
onMoreBtnClick: () -> Unit,
onNavigateToMyAlbumImage: (Int) -> Unit,
) {
) {
val span: (LazyGridItemSpanScope) -> GridItemSpan = { GridItemSpan(2) }
val myAlbumCount = myAlbumImageList.size

Expand Down Expand Up @@ -185,6 +185,7 @@ internal fun MyPageContentUser(albumImgCount: Int) {
)
}
}

@Composable
internal fun MyPageContentEmpty() {
Column(
Expand All @@ -198,8 +199,7 @@ internal fun MyPageContentEmpty() {
painter = painterResource(R.drawable.ic_no_img),
contentDescription = "no image",
contentScale = ContentScale.Fit,
modifier = Modifier
.size(100.dp)
modifier = Modifier.size(100.dp),
)
Spacer(modifier = Modifier.height(12.dp))
Text(
Expand All @@ -217,7 +217,7 @@ internal fun MyAlbumImage(
onMoreBtnClick: () -> Unit,
onNavigateToMyAlbumImage: (Int) -> Unit,
index: Int,
) {
) {
Box(
modifier = Modifier
.clip(RoundedCornerShape(12.dp))
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
package com.nexters.ilab.android.feature.mypage

interface MyPageSideEffect {
}
interface MyPageSideEffect
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
package com.nexters.ilab.android.feature.mypage


data class MyAlbum (
data class MyAlbum(
val myAlbumImage: List<Pair<String, String>> = emptyList(),
val myAlbumKeyword: String = ""
val myAlbumKeyword: String = "",
)

data class MyPageState(
val selectedMyAlbum: Int = 0,
val myAlbumImageList: List<MyAlbum> = emptyList(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class MyPageViewModel @Inject constructor() : ViewModel(), ContainerHost<MyPageS
override val container = container<MyPageState, MyPageSideEffect>(MyPageState())

// for test
val DummyMyAlbumList: List<MyAlbum> = listOf(
val DummyMyAlbumList: List<MyAlbum> = listOf(
MyAlbum(setDummyImageList(1), "몽환적인"),
MyAlbum(setDummyImageList(2), "자연적인"),
MyAlbum(setDummyImageList(3), "스케치"),
Expand Down Expand Up @@ -44,7 +44,7 @@ class MyPageViewModel @Inject constructor() : ViewModel(), ContainerHost<MyPageS
}

internal fun setDummyImageList(index: Int): List<Pair<String, String>> {
return when(index) {
return when (index) {
1 -> listOf(
"https://picsum.photos/id/49/1280/792" to "Created Image Example 1",
"https://picsum.photos/id/53/1280/1280" to "Created Image Example 2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ fun NavGraphBuilder.myPageNavGraph(
onSettingClick = onSettingClick,
onNavigateToMyAlbumImage = onNavigateToMyAlbumImage,
onShowErrorSnackBar = onShowErrorSnackBar,
viewModel = viewModel
viewModel = viewModel,
)
}

Expand Down

0 comments on commit af47be5

Please sign in to comment.