Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f2fd0a6a6e | |||
| dcbc14b8a1 | |||
| 46400ae58a | |||
| e190ac76b5 | |||
| e62f21c86a | |||
| 9819af3111 |
@@ -20,8 +20,8 @@ android {
|
||||
applicationId = "com.example.shiftalarm"
|
||||
minSdk = 26
|
||||
targetSdk = 35
|
||||
versionCode = 1153
|
||||
versionName = "1.5.3"
|
||||
versionCode = 1154
|
||||
versionName = "1.5.4"
|
||||
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
@@ -746,7 +746,7 @@ class MainActivity : AppCompatActivity() {
|
||||
.alpha(1f)
|
||||
.scaleX(1f)
|
||||
.scaleY(1f)
|
||||
.setDuration(280)
|
||||
.setDuration(150)
|
||||
.setInterpolator(AccelerateDecelerateInterpolator())
|
||||
.start()
|
||||
}
|
||||
|
||||
@@ -110,17 +110,21 @@ class ShiftRepository(private val context: Context) {
|
||||
}
|
||||
|
||||
suspend fun getSaturdayOvertimeHours(): Int = withContext(Dispatchers.IO) {
|
||||
val currentYear = LocalDate.now().year
|
||||
val allOverrides = dao.getAllOverrides()
|
||||
val today = LocalDate.now()
|
||||
val yearMonth = java.time.YearMonth.of(today.year, today.monthValue)
|
||||
|
||||
val saturdayWorkDays = allOverrides.filter { override ->
|
||||
val date = LocalDate.parse(override.date)
|
||||
date.year == currentYear &&
|
||||
date.dayOfWeek == java.time.DayOfWeek.SATURDAY &&
|
||||
override.shift != "휴무" &&
|
||||
override.shift != "휴가"
|
||||
// 해당 월의 토요일 개수 계산
|
||||
var saturdayCount = 0
|
||||
var date = yearMonth.atDay(1)
|
||||
val lastDay = yearMonth.atEndOfMonth()
|
||||
|
||||
while (!date.isAfter(lastDay)) {
|
||||
if (date.dayOfWeek == java.time.DayOfWeek.SATURDAY) {
|
||||
saturdayCount++
|
||||
}
|
||||
date = date.plusDays(1)
|
||||
}
|
||||
|
||||
saturdayWorkDays.size * 2
|
||||
saturdayCount * 2
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<!-- 배경색: 다크모드에서도 잘 보이도록 surface 색상 사용 -->
|
||||
<solid android:color="#CC333333" />
|
||||
<solid android:color="@color/surface_variant" />
|
||||
<corners android:radius="16dp" />
|
||||
<stroke
|
||||
android:width="1dp"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<solid android:color="#FFFFFFFF"/> <!-- Fully Opaque to hide everything behind -->
|
||||
<solid android:color="@color/surface"/> <!-- Theme-aware surface color -->
|
||||
<corners android:radius="32dp"/>
|
||||
<stroke android:width="1.2dp" android:color="#1A000000"/>
|
||||
</shape>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="14sp"
|
||||
android:textColor="@android:color/white"
|
||||
android:textColor="@color/text_primary"
|
||||
android:maxLines="2"
|
||||
android:ellipsize="end" />
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"versionCode": 1153,
|
||||
"versionName": "1.5.3",
|
||||
"apkUrl": "https://git.webpluss.net/attachments/406e47e1-3ed6-4d5f-bf6f-38923ba489e4",
|
||||
"changelog": "v1.5.3: 스와이프 월 이동 버그 수정, 연장근무 표시 개선",
|
||||
"versionCode": 1154,
|
||||
"versionName": "1.5.4",
|
||||
"apkUrl": "https://git.webpluss.net/attachments/d38e521a-6019-43bf-8f40-bd9928907252",
|
||||
"changelog": "v1.5.4: 토요일 연장근무 기본값 표시, 애니메이션 속도 개선, 다크모드 개선",
|
||||
"forceUpdate": false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user