-
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
현재 선택된 학교 가져오는 기능 만들기 #26
Comments
interface CurrentSchool : Observable<School>
|
|
|
interface CurrentSchool {
fun observe(): ReceiveChannel<School?>
} 사용 예 1: launch {
CurrentSchool.observe().forEach { school: School? ->
// 코드
}
} 사용 예 2: launch {
CurrentSchool.observe()
.filter { it.course != School.Course.INFANT } // 유치원이 아닌 것만 걸러내기
.forEach { school: School? ->
// 코드
}
} 코루틴이 완료되거나 취소되었을 때 |
RxJava 기준, val CurrentSchool: Observable<School> =
RecentSchools.map { schools: List<School> -> schools.firstOrNull() } |
#34 이슈를 먼저 해결해야 함 |
현재 선택된 학교를 프리퍼런스에 JSON 형태로 저장하기 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
이름 후보
CurrentSchool
필요 기능
기타 생각
구현하는데(사용자가 최근 검색한 학교를 삭제할 수도 있으므로RecentSchools
를 재사용하면 좋을 듯RecentSchools
를 재사용하는 건 위험)The text was updated successfully, but these errors were encountered: