v1.1.7 - 교육 근무 변경 시 원래 근무 알람 울림 보장
This commit is contained in:
@@ -20,8 +20,8 @@ android {
|
||||
applicationId = "com.example.shiftalarm"
|
||||
minSdk = 26
|
||||
targetSdk = 35
|
||||
versionCode = 116
|
||||
versionName = "1.1.6"
|
||||
versionCode = 117
|
||||
versionName = "1.1.7"
|
||||
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
@@ -1,5 +1,9 @@
|
||||
# Changelog
|
||||
|
||||
## [1.1.7] - 2026-08-17
|
||||
### Fixed
|
||||
- **교육 근무 변경 시 원래 근무 알람 울림 보장**: 달력에서 교육으로 근무를 변경해도 원래 근무(주간/석간/야간 등)의 알람이 정상적으로 울리도록 개선
|
||||
|
||||
## [1.1.6] - 2026-08-15
|
||||
### Fixed
|
||||
- **알람 추가 시 기본 볼륨 0 버그 수정**: 시스템 알람 스트림 볼륨을 항상 최대치로 강제 설정하여 새 알람 추가 시 볼륨이 0이 되는 문제 원천 차단
|
||||
|
||||
@@ -63,7 +63,18 @@ object AlarmSyncManager {
|
||||
.getString("selected_factory", "Jeonju") ?: "Jeonju"
|
||||
)
|
||||
|
||||
if (addedAlarm.shiftType == "기타" || addedAlarm.shiftType == shift) {
|
||||
// 교육으로 변경된 경우 원래 근무의 알람이 울리도록 원래 근무 타입을 사용
|
||||
val alarmMatchShift = if (shift == "교육") {
|
||||
val team = context.getSharedPreferences("ShiftAlarmPrefs", Context.MODE_PRIVATE)
|
||||
.getString("selected_team", "A") ?: "A"
|
||||
val factory = context.getSharedPreferences("ShiftAlarmPrefs", Context.MODE_PRIVATE)
|
||||
.getString("selected_factory", "Jeonju") ?: "Jeonju"
|
||||
ShiftCalculator.getShift(targetDate, team, factory)
|
||||
} else {
|
||||
shift
|
||||
}
|
||||
|
||||
if (addedAlarm.shiftType == "기타" || addedAlarm.shiftType == alarmMatchShift) {
|
||||
scheduleCustomAlarm(
|
||||
context,
|
||||
targetDate,
|
||||
@@ -117,7 +128,18 @@ object AlarmSyncManager {
|
||||
.getString("selected_factory", "Jeonju") ?: "Jeonju"
|
||||
)
|
||||
|
||||
if (alarm.shiftType == "기타" || alarm.shiftType == shift) {
|
||||
// 교육으로 변경된 경우 원래 근무의 알람이 울리도록 원래 근무 타입을 사용
|
||||
val alarmMatchShift = if (shift == "교육") {
|
||||
val team = context.getSharedPreferences("ShiftAlarmPrefs", Context.MODE_PRIVATE)
|
||||
.getString("selected_team", "A") ?: "A"
|
||||
val factory = context.getSharedPreferences("ShiftAlarmPrefs", Context.MODE_PRIVATE)
|
||||
.getString("selected_factory", "Jeonju") ?: "Jeonju"
|
||||
ShiftCalculator.getShift(targetDate, team, factory)
|
||||
} else {
|
||||
shift
|
||||
}
|
||||
|
||||
if (alarm.shiftType == "기타" || alarm.shiftType == alarmMatchShift) {
|
||||
scheduleCustomAlarm(
|
||||
context,
|
||||
targetDate,
|
||||
@@ -248,7 +270,14 @@ object AlarmSyncManager {
|
||||
val targetDate = today.plusDays(i.toLong())
|
||||
val shift = repo.getShift(targetDate, team, factory)
|
||||
|
||||
if (alarm.shiftType == "기타" || alarm.shiftType == shift) {
|
||||
// 교육으로 변경된 경우 원래 근무의 알람이 울리도록 원래 근무 타입을 사용
|
||||
val alarmMatchShift = if (shift == "교육") {
|
||||
ShiftCalculator.getShift(targetDate, team, factory)
|
||||
} else {
|
||||
shift
|
||||
}
|
||||
|
||||
if (alarm.shiftType == "기타" || alarm.shiftType == alarmMatchShift) {
|
||||
scheduleCustomAlarm(
|
||||
context,
|
||||
targetDate,
|
||||
|
||||
@@ -352,11 +352,18 @@ suspend fun syncAllAlarms(context: Context) {
|
||||
val targetDate = today.plusDays(i.toLong())
|
||||
val shift = repo.getShift(targetDate, team, factory)
|
||||
|
||||
// 교육으로 변경된 경우 원래 근무의 알람이 울리도록 원래 근무 타입을 사용
|
||||
val alarmMatchShift = if (shift == "교육") {
|
||||
ShiftCalculator.getShift(targetDate, team, factory)
|
||||
} else {
|
||||
shift
|
||||
}
|
||||
|
||||
for (alarm in customAlarms) {
|
||||
if (!alarm.isEnabled) continue
|
||||
|
||||
// 근무 연동 조건 확인
|
||||
if (alarm.shiftType == "기타" || alarm.shiftType == shift) {
|
||||
if (alarm.shiftType == "기타" || alarm.shiftType == alarmMatchShift) {
|
||||
scheduleCustomAlarm(
|
||||
context,
|
||||
targetDate,
|
||||
|
||||
Reference in New Issue
Block a user