-
Notifications
You must be signed in to change notification settings - Fork 0
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
대표 시간표 지정 #209
대표 시간표 지정 #209
Conversation
이건 아직 진행중인거지? |
엥 다 됐어! 아이콘만 수정하는 PR이어서 |
그럼 나는 RN만 집중할게 ㄱㅅㄱㅅ |
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.
LGTM
API 연결 후 머지 ㄱㄱ |
changeSelectedTable(siblingTables.first().last().id) | ||
} else { | ||
changeSelectedTable(siblingTables.first()[indexInSibling].id) | ||
} |
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.
현재 시간표 삭제 로직 수정
현재 학기의 유일한 시간표를 삭제하려는 경우, 삭제하고 전체에서의 인덱스에 따라 다른 시간표를 선택한다
app/src/main/java/com/wafflestudio/snutt2/views/logged_in/home/drawer/HomeDrawer.kt
Outdated
Show resolved
Hide resolved
text = stringResource(R.string.home_drawer_table_unset_primary) | ||
) { | ||
scope.launch { | ||
// TODO: API 호출 |
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.
대표시간표 해제 API 나올 때까지 기다리는중
var expanded by remember { mutableStateOf(false) } | ||
LaunchedEffect(table) { | ||
if (courseBook.year == table.year && courseBook.semester == table.semester) { | ||
expanded = true |
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.
현재 시간표를 삭제하여 새로운 table이 선택되면 expanded 여부가 다시 계산되고 있었고,
따라서 현재 시간표를 삭제하여 새로운 table이 선택되었을 때, 열려 있던 다른 coursebook들이 갑자기 닫히는 문제가 있었음
LaunchedEffect로 해결했는데 괜찮아??
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.
그냥 remember에 key를 빼버리면 안 되나?
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.
그러면 현재 테이블을 삭제하여 다른 테이블을 선택하게 되었을 때, 해당 coursebook이 자동으로 expand 되지 않음... 유저 입장에서는 선택된 학기가 갑자기 사라진 것처럼 보이더라구
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.
아항 그러면 어쩔 수 없겠네
LaunchedEffect 저기다 넣어 놔도 잘 동작하면 그렇게 고고
@@ -36,7 +36,7 @@ fun CourseBookDto.toFormattedString(context: Context): String { | |||
4L -> context.getString(R.string.course_book_winter) | |||
else -> "-" | |||
} | |||
return "${this.year} $semesterStr" | |||
return "${this.year}년 $semesterStr" |
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.
NNNN년 N학기
9d57a27
to
b0fd4cd
Compare
친구 기능에서 사용할 대표 시간표 지정 기능
(원래 아이콘 수정 PR이었다)