Skip to content

Commit 12d3ee6

Browse files
committed
feat : 알람 도보시간 추가
1 parent a2c1b97 commit 12d3ee6

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

data/src/main/java/com/stop/data/local/model/Alarm.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ data class Alarm(
1010
val endPosition: String,
1111
val routes: List<Route>,
1212
val lastTime: String, // 막차 시간 -> 23:30:15 시분초
13+
val walkTime : Int, // 도보시간 -> 분단위
1314
val alarmTime: Int, // 10분 전 알람 설정 -> 10
1415
val alarmCode: Int, // 알람을 식별하기 위한 알람 ID
1516
val alarmMethod: Boolean, // true 소리 false 진동
@@ -20,6 +21,7 @@ data class Alarm(
2021
endPosition,
2122
routes,
2223
lastTime,
24+
walkTime,
2325
alarmTime,
2426
alarmCode,
2527
alarmMethod

data/src/main/java/com/stop/data/model/alarm/AlarmRepositoryItem.kt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ data class AlarmRepositoryItem(
99
val endPosition: String,
1010
val routes: List<Route>,
1111
val lastTime: String, // 막차 시간 -> 23:30:15 시분초
12+
val walkTime : Int, // 도보시간 -> 분단위
1213
val alarmTime: Int, // 10분 전 알람 설정 -> 10
1314
val alarmCode: Int, // 알람을 식별하기 위한 알람 ID
1415
val alarmMethod: Boolean, // true 소리 false 진동
@@ -19,6 +20,7 @@ data class AlarmRepositoryItem(
1920
endPosition,
2021
routes,
2122
lastTime,
23+
walkTime,
2224
alarmTime,
2325
alarmCode,
2426
alarmMethod
@@ -29,6 +31,7 @@ data class AlarmRepositoryItem(
2931
endPosition,
3032
routes,
3133
lastTime,
34+
walkTime,
3235
alarmTime,
3336
alarmCode,
3437
alarmMethod

presentation/src/main/java/com/stop/ui/alarmsetting/AlarmSettingFragment.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ class AlarmSettingFragment : Fragment() {
9393
endPosition = clickRouteViewModel.clickRoute?.routes?.last()?.end?.name ?: "도착지 없음",
9494
routes = clickRouteViewModel.clickRoute?.routes ?: emptyList(),
9595
lastTime = clickRouteViewModel.lastTime,
96+
walkTime = (clickRouteViewModel.clickRoute?.routes?.first()?.sectionTime?.div(60))?.roundToInt() ?: 0,
9697
0,
9798
ALARM_CODE,
9899
true

0 commit comments

Comments
 (0)