-
Notifications
You must be signed in to change notification settings - Fork 0
Refactor: :feature:general MVI 전환 #188
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 11 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
26157af
♻️ Refactor: DateSettingSection interactionSource 파라미터 제거
dogmania 778df56
🔥 Remove: interactionSource 제거
dogmania 54a6743
✨ Feat: AppResult 기반 api 통신 메서드 구현
dogmania d8521de
✨ Feat: MVI 전용 NavRoutes 추가
dogmania 855e3a2
🔥 Remove: 불필요한 파라미터 제거
dogmania 67c3f61
✨ Feat: MVI 전용 화면 구현
dogmania c946b48
✨ Feat: GeneralScheduleIntent 정의
dogmania 4a36b09
✨ Feat: GeneralScheduleSideEffect 정의
dogmania 72fa484
✨ Feat: GeneralScheduleState 정의
dogmania 303bcb0
✨ Feat: MVI 기반 GeneralScheduleViewModel 구현
dogmania 01caa53
♻️ Refactor: GeneralScheduleMviNavGraph로 마이그레이션
dogmania 9a8fef4
♻️ Refactor: interactionSource remember로 유지
dogmania 7ef97ee
♻️ Refactor: 검색어가 비어있는 경우 이전 Job 취소
dogmania 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
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
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
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
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
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
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
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
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
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
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
89 changes: 89 additions & 0 deletions
89
feature/general/src/commonMain/kotlin/com/ondot/general/contract/GeneralScheduleIntent.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,89 @@ | ||
| package com.ondot.general.contract | ||
|
|
||
| import com.ondot.domain.model.enums.RouterType | ||
| import com.ondot.domain.model.member.AddressInfo | ||
| import com.ondot.domain.model.member.PlaceHistory | ||
| import com.ondot.ui.base.mvi.Intent | ||
| import kotlinx.datetime.LocalDate | ||
| import kotlinx.datetime.LocalTime | ||
|
|
||
| sealed interface GeneralScheduleIntent : Intent { | ||
| data object InitStep : GeneralScheduleIntent | ||
|
|
||
| data class ToggleRepeat( | ||
| val isRepeat: Boolean, | ||
| ) : GeneralScheduleIntent | ||
|
|
||
| data class SelectRepeatPreset( | ||
| val index: Int, | ||
| ) : GeneralScheduleIntent | ||
|
|
||
| data class ToggleWeekDay( | ||
| val index: Int, | ||
| ) : GeneralScheduleIntent | ||
|
|
||
| data object ToggleCalendar : GeneralScheduleIntent | ||
|
|
||
| data object MoveToPreviousMonth : GeneralScheduleIntent | ||
|
|
||
| data object MoveToNextMonth : GeneralScheduleIntent | ||
|
|
||
| data class SelectDate( | ||
| val date: LocalDate, | ||
| ) : GeneralScheduleIntent | ||
|
|
||
| data object ToggleTimeDial : GeneralScheduleIntent | ||
|
|
||
| data class SelectTime( | ||
| val time: LocalTime, | ||
| ) : GeneralScheduleIntent | ||
|
|
||
| data object InitHomeAddress : GeneralScheduleIntent | ||
|
|
||
| data object InitPlaceHistory : GeneralScheduleIntent | ||
|
|
||
| data class SetFocusedRouterType( | ||
| val type: RouterType, | ||
| ) : GeneralScheduleIntent | ||
|
|
||
| data class UpdateRouteInput( | ||
| val input: String, | ||
| ) : GeneralScheduleIntent | ||
|
|
||
| data class SelectPlace( | ||
| val place: AddressInfo, | ||
| ) : GeneralScheduleIntent | ||
|
|
||
| data class SelectHistory( | ||
| val history: PlaceHistory, | ||
| ) : GeneralScheduleIntent | ||
|
|
||
| data class DeleteHistory( | ||
| val history: PlaceHistory, | ||
| ) : GeneralScheduleIntent | ||
|
|
||
| data object ToggleHomeDeparture : GeneralScheduleIntent | ||
|
|
||
| data class SetInitialPlacePicker( | ||
| val isInitial: Boolean, | ||
| ) : GeneralScheduleIntent | ||
|
|
||
| data object ClickNext : GeneralScheduleIntent | ||
|
|
||
| data object ClickBack : GeneralScheduleIntent | ||
|
|
||
| data class UpdateScheduleTitle( | ||
| val title: String, | ||
| ) : GeneralScheduleIntent | ||
|
|
||
| data object TogglePreparationAlarm : GeneralScheduleIntent | ||
|
|
||
| data class SetBottomSheetVisible( | ||
| val visible: Boolean, | ||
| ) : GeneralScheduleIntent | ||
|
|
||
| data class CreateSchedule( | ||
| val isMedicationRequired: Boolean, | ||
| val preparationNote: String, | ||
| ) : GeneralScheduleIntent | ||
| } |
19 changes: 19 additions & 0 deletions
19
...ure/general/src/commonMain/kotlin/com/ondot/general/contract/GeneralScheduleSideEffect.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,19 @@ | ||
| package com.ondot.general.contract | ||
|
|
||
| import com.ondot.domain.model.enums.ToastType | ||
| import com.ondot.ui.base.mvi.SideEffect | ||
|
|
||
| sealed interface GeneralScheduleSideEffect : SideEffect { | ||
| data class ShowToast( | ||
| val message: String, | ||
| val type: ToastType, | ||
| ) : GeneralScheduleSideEffect | ||
|
|
||
| data object NavigateToPlacePicker : GeneralScheduleSideEffect | ||
|
|
||
| data object NavigateToRouteLoading : GeneralScheduleSideEffect | ||
|
|
||
| data object NavigateToMain : GeneralScheduleSideEffect | ||
|
|
||
| data object RequestArrivalFocus : GeneralScheduleSideEffect | ||
| } |
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.