-
Notifications
You must be signed in to change notification settings - Fork 0
[Feat] PlaceMap의 하위 Fragment 제거 및 MVI 아키텍쳐 적용 #24
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
Open
oungsi2000
wants to merge
22
commits into
develop
Choose a base branch
from
feat/18
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+2,456
−2,501
Open
Changes from 14 commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
df8a5cc
refactor(PlaceMap): 뒤로 가기 처리 로직 Compose BackHandler로 마이그레이션
oungsi2000 649b1cd
refactor(PlaceMap): UI 상태 관리 클래스 일반화 및 구조 개선
oungsi2000 f208c15
refactor(PlaceMap): TimeTag 상태 관리 StateFlow 및 UiState로 마이그레이션
oungsi2000 a57f04e
refactor(PlaceMap): ViewModel LiveData -> Flow 마이그레이션
oungsi2000 c8055f0
refactor(PlaceMap): Fragment 트랜잭션 제거 및 Compose UI로 전면 전환
oungsi2000 da97853
refactor(PlaceMap): View 시스템 코드 제거 및 패키지 구조 통합
oungsi2000 8aaf666
refactor(PlaceMap): MVI 아키텍처 도입 및 상태 관리 리팩토링
oungsi2000 55b2501
refactor(PlaceMap): 지도 제어 이벤트 분리 및 핸들러 리팩토링
oungsi2000 6a287bd
fix(MapFilterManager): 타임태그 없는 경우 마커 필터링 오류 수정
oungsi2000 f3b5565
refactor(PlaceMap): 비대해진 ViewModel 3개의 Handler로 분리
oungsi2000 f67125b
refactor(PlaceMap): ActionHandler 의존성 주입 리팩토링 (Metro)
oungsi2000 f2d693f
refactor(PlaceMap): Intent Handler 구조 표준화 및 패키지 정리
oungsi2000 d5913f4
refactor(PlaceMap): 하드코딩된 UI 수치를 Theme Spacing으로 추출 및 적용
oungsi2000 f71dc7b
test(PlaceMap): ActionHandler 테스트 작성
oungsi2000 14bfbb2
fix(FestaBookApp): 전역 예외 처리 핸들러 활성화
oungsi2000 f98fbef
refactor(PlaceMap): 컴포저블 사이드 이펙트 when절 -> 상단으로 분리
oungsi2000 0942544
refactor(PlaceMap): MapControlEventHandler uiState에 getter 적용
oungsi2000 d2ddeeb
test(PlaceMap): Flow 테스트 유틸리티 개선 및 에러 핸들링 테스트 추가
oungsi2000 64ceeb7
refactor(PlaceMap): ListLoadState 구조 개선 및 마커 선택 동시성 문제시 일관성 보장
oungsi2000 946a669
refactor(PlaceMap): await 확장 함수에 타임아웃 처리 추가
oungsi2000 f4dd3b3
fix(PlaceMap): 이벤트 채널 설정 수정 및 테스트 리소스 해제 로직 추가
oungsi2000 f915ae8
refactor(test): observeEvent timeout 처리 로직 변경
oungsi2000 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
4 changes: 2 additions & 2 deletions
4
app/src/main/java/com/daedan/festabook/di/mapManager/MapManagerBindings.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
6 changes: 6 additions & 0 deletions
6
app/src/main/java/com/daedan/festabook/di/placeMapHandler/CachedPlaceByTimeTag.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,6 @@ | ||
| package com.daedan.festabook.di.placeMapHandler | ||
|
|
||
| import dev.zacsweers.metro.Qualifier | ||
|
|
||
| @Qualifier | ||
| annotation class CachedPlaceByTimeTag |
6 changes: 6 additions & 0 deletions
6
app/src/main/java/com/daedan/festabook/di/placeMapHandler/CachedPlaces.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,6 @@ | ||
| package com.daedan.festabook.di.placeMapHandler | ||
|
|
||
| import dev.zacsweers.metro.Qualifier | ||
|
|
||
| @Qualifier | ||
| annotation class CachedPlaces |
38 changes: 38 additions & 0 deletions
38
app/src/main/java/com/daedan/festabook/di/placeMapHandler/PlaceMapHandlerGraph.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,38 @@ | ||
| package com.daedan.festabook.di.placeMapHandler | ||
|
|
||
| import com.daedan.festabook.presentation.placeMap.intent.event.MapControlEvent | ||
| import com.daedan.festabook.presentation.placeMap.intent.event.PlaceMapEvent | ||
| import com.daedan.festabook.presentation.placeMap.intent.handler.FilterActionHandler | ||
| import com.daedan.festabook.presentation.placeMap.intent.handler.MapEventActionHandler | ||
| import com.daedan.festabook.presentation.placeMap.intent.handler.SelectActionHandler | ||
| import com.daedan.festabook.presentation.placeMap.intent.state.PlaceMapUiState | ||
| import com.daedan.festabook.presentation.placeMap.model.PlaceUiModel | ||
| import dev.zacsweers.metro.AppScope | ||
| import dev.zacsweers.metro.ContributesTo | ||
| import dev.zacsweers.metro.GraphExtension | ||
| import dev.zacsweers.metro.Provides | ||
| import kotlinx.coroutines.CoroutineScope | ||
| import kotlinx.coroutines.channels.Channel | ||
| import kotlinx.coroutines.flow.StateFlow | ||
|
|
||
| @GraphExtension(PlaceMapViewModelScope::class) | ||
| interface PlaceMapHandlerGraph { | ||
| val filterActionHandler: FilterActionHandler | ||
| val selectActionHandler: SelectActionHandler | ||
| val mapEventActionHandler: MapEventActionHandler | ||
|
|
||
| @ContributesTo(AppScope::class) | ||
| @GraphExtension.Factory | ||
| interface Factory { | ||
| fun create( | ||
| @Provides mapControlUiEvent: Channel<MapControlEvent>, | ||
| @Provides placeMapUiEvent: Channel<PlaceMapEvent>, | ||
| @Provides uiState: StateFlow<PlaceMapUiState>, | ||
| @Provides @CachedPlaces cachedPlaces: StateFlow<List<PlaceUiModel>>, | ||
| @Provides @CachedPlaceByTimeTag cachedPlaceByTimeTag: StateFlow<List<PlaceUiModel>>, | ||
| @Provides onUpdateCachedPlace: (List<PlaceUiModel>) -> Unit, | ||
| @Provides onUpdateState: ((PlaceMapUiState) -> PlaceMapUiState) -> Unit, | ||
| @Provides scope: CoroutineScope, | ||
| ): PlaceMapHandlerGraph | ||
| } | ||
| } |
3 changes: 3 additions & 0 deletions
3
app/src/main/java/com/daedan/festabook/di/placeMapHandler/PlaceMapViewModelScope.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,3 @@ | ||
| package com.daedan.festabook.di.placeMapHandler | ||
|
|
||
| abstract class PlaceMapViewModelScope private constructor() |
25 changes: 25 additions & 0 deletions
25
app/src/main/java/com/daedan/festabook/presentation/common/ObserveEvent.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,25 @@ | ||
| package com.daedan.festabook.presentation.common | ||
|
|
||
| import androidx.compose.runtime.Composable | ||
| import androidx.compose.runtime.LaunchedEffect | ||
| import androidx.lifecycle.Lifecycle | ||
| import androidx.lifecycle.compose.LocalLifecycleOwner | ||
| import androidx.lifecycle.repeatOnLifecycle | ||
| import kotlinx.coroutines.Dispatchers | ||
| import kotlinx.coroutines.flow.Flow | ||
| import kotlinx.coroutines.withContext | ||
|
|
||
| @Composable | ||
| fun <T> ObserveAsEvents( | ||
| flow: Flow<T>, | ||
| onEvent: suspend (T) -> Unit, | ||
| ) { | ||
| val lifecycleOwner = LocalLifecycleOwner.current | ||
| LaunchedEffect(flow, lifecycleOwner.lifecycle) { | ||
| lifecycleOwner.repeatOnLifecycle(Lifecycle.State.STARTED) { | ||
| withContext(Dispatchers.Main.immediate) { | ||
| flow.collect(onEvent) | ||
| } | ||
| } | ||
| } | ||
| } |
2 changes: 1 addition & 1 deletion
2
...tation/placeMap/placeList/CategoryView.kt → .../presentation/placeDetail/CategoryView.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
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.