-
Notifications
You must be signed in to change notification settings - Fork 0
✨ :: (#125) - 알레르기 설정 기능 추가 #127
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
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
0a7d96e
✨ :: 설정 화면에 '알레르기 설정' 진입점 추가
khs3994 b0e404e
✨ :: 알레르기 기능 더미 Route, Screen, ViewModel 구조 추가
khs3994 7f4179f
✨ :: AllergiesScreen UI 구현 (AllergiesCard 그리드 + 선택 토글)
khs3994 08ddf39
:lipstick: :: 알러지 컴포넌트 개선
khs3994 ae8fed2
:sparkles: :: ViewModel 추가 및 클릭액션 연동
khs3994 cff9622
✨ :: 급식 메뉴 모델에 알러지 정보 파싱 추가
khs3994 143dce4
✨ :: 알러지 로컬 저장소 및 DI 구성
khs3994 e2e4b18
✨ :: 알러지 필터링 UI 연동
khs3994 4c50c4d
🐛 :: 알러지 저장/조회 안정성 개선
khs3994 698e30c
♻️ :: 알러지 ID 컬렉션 타입을 List<Int>에서 Set<Int>으로 변경
khs3994 b329c90
💄 :: UX 개선 - 네비게이션 중복 방지 및 deprecated Divider 교체
khs3994 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,3 +22,4 @@ | |
| .externalNativeBuild | ||
| .cxx | ||
| local.properties | ||
| .omc | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
196 changes: 0 additions & 196 deletions
196
core/designsystem/src/main/java/khs/onmi/core/designsystem/icon/AllergiesIcon.kt
This file was deleted.
Oops, something went wrong.
8 changes: 8 additions & 0 deletions
8
data/src/main/java/com/onmi/data/datasource/LocalAllergyDataSource.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| package com.onmi.data.datasource | ||
|
|
||
| import kotlinx.coroutines.flow.Flow | ||
|
|
||
| interface LocalAllergyDataSource { | ||
| fun getSelectedAllergyIds(): Flow<Set<Int>> | ||
| suspend fun saveSelectedAllergyIds(ids: Set<Int>) | ||
| } |
31 changes: 31 additions & 0 deletions
31
data/src/main/java/com/onmi/data/datasourceimpl/LocalAllergyDataSourceImpl.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| package com.onmi.data.datasourceimpl | ||
|
|
||
| import androidx.datastore.core.DataStore | ||
| import androidx.datastore.preferences.core.Preferences | ||
| import androidx.datastore.preferences.core.edit | ||
| import androidx.datastore.preferences.core.stringSetPreferencesKey | ||
| import com.onmi.data.datasource.LocalAllergyDataSource | ||
| import kotlinx.coroutines.flow.Flow | ||
| import kotlinx.coroutines.flow.map | ||
| import javax.inject.Inject | ||
|
|
||
| class LocalAllergyDataSourceImpl @Inject constructor( | ||
| private val dataStore: DataStore<Preferences>, | ||
| ) : LocalAllergyDataSource { | ||
|
|
||
| companion object { | ||
| private val SELECTED_ALLERGY_IDS = stringSetPreferencesKey("selected_allergy_ids") | ||
| } | ||
|
|
||
| override fun getSelectedAllergyIds(): Flow<Set<Int>> { | ||
| return dataStore.data.map { prefs -> | ||
| prefs[SELECTED_ALLERGY_IDS]?.mapNotNull { it.toIntOrNull() }?.toSet() ?: emptySet() | ||
| } | ||
| } | ||
|
|
||
| override suspend fun saveSelectedAllergyIds(ids: Set<Int>) { | ||
| dataStore.edit { prefs -> | ||
| prefs[SELECTED_ALLERGY_IDS] = ids.map { it.toString() }.toSet() | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.