-
Notifications
You must be signed in to change notification settings - Fork 0
Feat: 알람 시간 재계산 기능 구현 #192
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
31 commits
Select commit
Hold shift + click to select a range
b76b0e8
✨ Feat: 편집 화면 전용 PlacePickerRoute 구현
dogmania fde0dec
♻️ Refactor: RouteInput 변경 시 Type도 함께 전달하도록 개선
dogmania d7641a7
✨ Feat: 편집 화면 -> PlacePicker, RouteLoading 네비게이션 GA 이벤트 기록
dogmania cc9af0c
✨ Feat: 편집 화면 RouteLoading, PlacePicker NavRoutes 정의
dogmania b2d551c
✨ Feat: transportType 필드 추가
dogmania 9cdbd1c
✨ Feat: 도착지 텍스트 필드 활성화 이벤트 추가
dogmania 322be64
✨ Feat: PlacePicker, RouteLoading 네비게이션 로직 구현
dogmania 01779ae
✨ Feat: PlacePickerState 상태 추가
dogmania f168718
✨ Feat: 장소 및 히스토리 상태 처리 로직 구현
dogmania b37bb34
✨ Feat: 수정 화면 알람 재계산 기능 구현
dogmania 2dd8cab
♻️ Refactor: 약속 날짜 수정의 경우 기존 날짜와 delta 계산 후 알람 날짜에 반영
dogmania 4f0033b
♻️ Refactor: autoNavigate 옵션 추가
dogmania 0ee8006
✨ Feat: 편집 화면 RouteLoadingRoute 추가
dogmania d3ffdb2
♻️ Refactor: preparePlacePicker 메서드를 활용해 이전 수정값이 유지되는 것을 방지
dogmania bf5bb68
✨ Feat: 알람 계산 중 여부를 나타내는 플래그 변수 추가
dogmania 6a441cf
✨ Feat: 편집 화면 RouteLoading 네비게이션 구현
dogmania c7ebbb7
✨ Feat: Preview 라이브러리 추가
dogmania 07a12c5
🍱 Chore: OnDotText Preview 구현
dogmania a34f451
✨ Feat: Preview 라이브러리 적용
dogmania 91d54be
✨ Feat: 일정 생성 전용 알람 시간 수정 바텀시트 구현
dogmania 97dc8d8
✨ Feat: 현재 변경 중인 알람 타입 상태 변수 추가
dogmania 932183a
✨ Feat: 현재 변경 중인 알람 타입 상태 변수 추가
dogmania 183fa7a
♻️ Refactor: 레거시 화면 대응
dogmania 5ce23db
✨ Feat: 바텀시트 활성화, 알람 타입 설정 Intent 정의
dogmania 58e4a92
✨ Feat: 알람 시간 업데이트 상태 처리 로직 구현
dogmania 2211cd9
✨ Feat: 준비, 출발 알람 수정 바텀시트 렌더링 로직 구현
dogmania 0451a12
♻️ Refactor: lint 적용
dogmania 8b76e42
⬆️ Upgrade: 버전 코드 업데이트
dogmania 124859b
♻️ Refactor: alarmId 유효성 검증 로직 추가
dogmania d234e5a
♻️ Refactor: 재계산된 alarmId를 기존 alarmId로 변경하는 로직 추가
dogmania fef20be
⬆️ Upgrade: 버전 코드 업데이트
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
37 changes: 37 additions & 0 deletions
37
core/design-system/src/commonMain/kotlin/com/ondot/designsystem/preview/OnDotPreview.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,37 @@ | ||
| package com.ondot.designsystem.preview | ||
|
|
||
| import androidx.compose.foundation.background | ||
| import androidx.compose.foundation.layout.Box | ||
| import androidx.compose.foundation.layout.fillMaxSize | ||
| import androidx.compose.foundation.layout.padding | ||
| import androidx.compose.runtime.Composable | ||
| import androidx.compose.ui.Alignment | ||
| import androidx.compose.ui.Modifier | ||
| import androidx.compose.ui.unit.dp | ||
| import com.dh.ondot.presentation.ui.theme.OnDotTheme | ||
| import com.ondot.designsystem.components.OnDotText | ||
| import com.ondot.designsystem.theme.OnDotColor.Gray0 | ||
| import com.ondot.designsystem.theme.OnDotColor.Gray900 | ||
| import com.ondot.domain.model.enums.OnDotTextStyle | ||
| import org.jetbrains.compose.ui.tooling.preview.Preview | ||
|
|
||
| @Preview | ||
| @Composable | ||
| private fun OnDotTextPreview() { | ||
| OnDotTheme { | ||
| Box( | ||
| modifier = | ||
| Modifier | ||
| .fillMaxSize() | ||
| .background(Gray0) | ||
| .padding(16.dp), | ||
| contentAlignment = Alignment.Center, | ||
| ) { | ||
| OnDotText( | ||
| text = "OnDot Preview", | ||
| style = OnDotTextStyle.BodyLargeSB, | ||
| color = Gray900, | ||
| ) | ||
| } | ||
| } | ||
| } |
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
83 changes: 83 additions & 0 deletions
83
feature/edit/src/commonMain/kotlin/com/ondot/edit/EditPlacePickerRoute.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,83 @@ | ||
| package com.ondot.edit | ||
|
|
||
| import androidx.compose.runtime.Composable | ||
| import androidx.compose.runtime.LaunchedEffect | ||
| import androidx.compose.runtime.getValue | ||
| import androidx.compose.runtime.remember | ||
| import androidx.compose.ui.focus.FocusRequester | ||
| import androidx.compose.ui.platform.LocalFocusManager | ||
| import androidx.lifecycle.compose.collectAsStateWithLifecycle | ||
| import com.ondot.platform.util.BackPressHandler | ||
| import com.ondot.ui.screen.placepicker.PlacePickerScreen | ||
| import org.koin.compose.viewmodel.koinViewModel | ||
|
|
||
| @Composable | ||
| fun EditPlacePickerRoute( | ||
| viewModel: EditScheduleViewModel = koinViewModel(), | ||
| popScreen: () -> Unit, | ||
| navigateToRouteLoading: () -> Unit, | ||
| ) { | ||
| val uiState by viewModel.uiState.collectAsStateWithLifecycle() | ||
| val departureFocusRequester = remember { FocusRequester() } | ||
| val arrivalFocusRequester = remember { FocusRequester() } | ||
| val focusManager = LocalFocusManager.current | ||
|
|
||
| LaunchedEffect(Unit) { | ||
| viewModel.preparePlacePicker() | ||
|
|
||
| if (uiState.placePickerState.homeAddress.title | ||
| .isBlank() && | ||
| !uiState.isHomeAddressInitialized | ||
| ) { | ||
| viewModel.fetchHomeAddress() | ||
| } | ||
| viewModel.fetchPlaceHistory() | ||
| } | ||
|
|
||
| LaunchedEffect(viewModel.eventFlow) { | ||
| viewModel.eventFlow.collect { event -> | ||
| when (event) { | ||
| EditScheduleEvent.RequestArrivalFocus -> arrivalFocusRequester.requestFocus() | ||
| else -> Unit | ||
| } | ||
| } | ||
| } | ||
|
|
||
| LaunchedEffect(uiState.isInitialPlacePicker) { | ||
| if (uiState.isInitialPlacePicker) { | ||
| departureFocusRequester.requestFocus() | ||
| viewModel.setInitialPlacePicker(false) | ||
| } | ||
| } | ||
|
|
||
| BackPressHandler(onBack = popScreen) | ||
|
|
||
| PlacePickerScreen( | ||
| state = uiState.placePickerState, | ||
| buttonEnabled = uiState.isPlacePickerButtonEnabled, | ||
| departureFocusRequester = departureFocusRequester, | ||
| arrivalFocusRequester = arrivalFocusRequester, | ||
| onRouteInputChanged = viewModel::updateRouteInput, | ||
| onRouteInputChangedByType = viewModel::updateRouteInput, | ||
| onRouteInputFocused = viewModel::setFocusedRouterType, | ||
| onPlaceSelected = { | ||
| viewModel.selectPlace(it) | ||
| focusManager.clearFocus() | ||
| }, | ||
| onHistorySelected = { | ||
| viewModel.selectHistory(it) | ||
| focusManager.clearFocus() | ||
| }, | ||
| onDeleteHistory = viewModel::deletePlaceHistory, | ||
| onToggleCheckBox = viewModel::toggleHomeDeparture, | ||
| onTransportTypeChanged = viewModel::updateTransportType, | ||
| onNext = { | ||
| if (viewModel.applyRouteChangesAndFetchAlarms()) { | ||
| navigateToRouteLoading() | ||
| } else { | ||
| popScreen() | ||
| } | ||
| }, | ||
| popScreen = popScreen, | ||
| ) | ||
| } |
27 changes: 27 additions & 0 deletions
27
feature/edit/src/commonMain/kotlin/com/ondot/edit/EditRouteLoadingRoute.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,27 @@ | ||
| package com.ondot.edit | ||
|
|
||
| import androidx.compose.runtime.Composable | ||
| import androidx.compose.runtime.LaunchedEffect | ||
| import androidx.compose.runtime.getValue | ||
| import androidx.lifecycle.compose.collectAsStateWithLifecycle | ||
| import com.ondot.ui.screen.loading.RouteLoadingScreen | ||
| import org.koin.compose.viewmodel.koinViewModel | ||
|
|
||
| @Composable | ||
| fun EditRouteLoadingRoute( | ||
| viewModel: EditScheduleViewModel = koinViewModel(), | ||
| navigateToEdit: () -> Unit, | ||
| ) { | ||
| val uiState by viewModel.uiState.collectAsStateWithLifecycle() | ||
|
|
||
| LaunchedEffect(uiState.isAlarmRecalculating) { | ||
| if (!uiState.isAlarmRecalculating) { | ||
| navigateToEdit() | ||
| } | ||
| } | ||
|
|
||
| RouteLoadingScreen( | ||
| autoNavigate = false, | ||
| navigateToNext = {}, | ||
| ) | ||
| } | ||
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.