-
Notifications
You must be signed in to change notification settings - Fork 3
[REFACTOR] 완료된 모임방 구현, 모임방 사용성 개선작업 #139
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
10bc152
fed1c73
4983463
5cd88cf
d58ed6c
cb9aced
c7c183b
b2f48e5
d366113
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -131,21 +131,25 @@ fun MySubscribeBarlist( | |
| } | ||
|
|
||
| @Composable | ||
| private fun EmptyMySubscriptionBar() { | ||
| fun EmptyMySubscriptionBar( | ||
| modifier: Modifier = Modifier, | ||
| text: String = stringResource(R.string.find_thip_mate), | ||
| onClick: () -> Unit = {} | ||
| ) { | ||
|
Comment on lines
+134
to
+138
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Composable 기본값에
다음 수정안을 적용해 주세요: @Composable
fun EmptyMySubscriptionBar(
- modifier: Modifier = Modifier,
- text: String = stringResource(R.string.find_thip_mate),
- onClick: () -> Unit = {}
+ modifier: Modifier = Modifier,
+ @StringRes textResId: Int = R.string.find_thip_mate,
+ onClick: () -> Unit = {}
) {
+ val displayText = stringResource(textResId)
@@
- text = text,
+ text = displayText,파일 상단에 import 추가: import androidx.annotation.StringResAlso applies to: 152-153 🤖 Prompt for AI Agents |
||
| Box( | ||
| modifier = Modifier | ||
| modifier = modifier | ||
| .padding(top = 8.dp) | ||
| .fillMaxWidth() | ||
| .height(42.dp) | ||
| .clip(RoundedCornerShape(12.dp)) | ||
| .background(colors.DarkGrey02) | ||
| .clickable { } | ||
| .clickable { onClick() } | ||
| ) { | ||
| Text( | ||
| modifier = Modifier | ||
| .align(Alignment.CenterStart) | ||
| .padding(start = 12.dp), | ||
| text = stringResource(R.string.find_thip_mate), | ||
| text = text, | ||
| color = colors.White, | ||
| style = typography.view_m500_s12_h20 | ||
| ) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -68,7 +68,7 @@ fun GroupRoomDeadlineSection( | |
| // Genre enum을 현지화된 문자열로 변환 | ||
| val genreStrings = Genre.entries.toDisplayStrings() | ||
|
|
||
| // 마감 임박 방 목록과 인기 방 목록을 섹션으로 구성 | ||
| // 마감 임박 방 목록, 인기 방 목록, 최신 생성 모임방을 섹션으로 구성 | ||
| val roomSections = listOf( | ||
| Pair( | ||
| stringResource(R.string.room_section_deadline), | ||
|
|
@@ -77,12 +77,18 @@ fun GroupRoomDeadlineSection( | |
| Pair( | ||
| stringResource(R.string.room_section_popular), | ||
| roomMainList?.popularRoomList ?: emptyList() | ||
| ) | ||
| ), | ||
| Pair( | ||
| stringResource(R.string.room_section_recent), | ||
| roomMainList?.recentRoomList ?: emptyList() | ||
| ), | ||
| ) | ||
|
|
||
| val actualPageCount = roomSections.size | ||
|
|
||
| val effectivePagerState = rememberPagerState( | ||
| initialPage = 0, | ||
| pageCount = { roomSections.size } | ||
| initialPage = 2, | ||
| pageCount = { Int.MAX_VALUE } | ||
| ) | ||
|
Comment on lines
+87
to
92
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "무한 스와이프" 구현 불완전 — 초기 페이지가 2면 좌측(이전) 방향이 막힙니다 pageCount를 Int.MAX_VALUE로 두면서 initialPage=2는 시작점이 너무 앞쪽이라 0 이하로는 이동 불가합니다. 가운데 근처에서 시작하고 섹션 개수에 정렬되도록 초기 페이지를 계산하세요. 적용 제안: - val actualPageCount = roomSections.size
+ val actualPageCount = roomSections.size
- val effectivePagerState = rememberPagerState(
- initialPage = 2,
- pageCount = { Int.MAX_VALUE }
- )
+ val startPage = remember(actualPageCount) {
+ if (actualPageCount > 0) {
+ val mid = Int.MAX_VALUE / 2
+ mid - (mid % actualPageCount)
+ } else 0
+ }
+ val effectivePagerState = rememberPagerState(
+ initialPage = startPage,
+ pageCount = { if (actualPageCount > 0) Int.MAX_VALUE else 1 }
+ )
@@
- val actualPage = page % actualPageCount
+ val actualPage = if (actualPageCount > 0) page % actualPageCount else 0Also applies to: 100-102 🤖 Prompt for AI Agents |
||
|
|
||
| HorizontalPager( | ||
|
|
@@ -91,7 +97,8 @@ fun GroupRoomDeadlineSection( | |
| pageSpacing = pageSpacing, | ||
| modifier = Modifier.fillMaxWidth() | ||
| ) { page -> | ||
| val (sectionTitle, rooms) = roomSections[page] | ||
| val actualPage = page % actualPageCount | ||
| val (sectionTitle, rooms) = roomSections[actualPage] | ||
|
|
||
| val isCurrent = effectivePagerState.currentPage == page | ||
| val scale = if (isCurrent) 1f else 0.94f | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
여기는 어떤 수정 사항이 있나요?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
전체 모임방을 볼 수 있는 버튼이 생겼는데 이 컴포넌트와 동일해서 string을 받을 수 있도록 했고, onClick을 추가했습니다 !