Skip to content

Commit 680caf3

Browse files
authored
πŸš€ :: v2.5.1
2 parents 96a3bd9 + 5988f22 commit 680caf3

File tree

21 files changed

+286
-281
lines changed

21 files changed

+286
-281
lines changed

β€Žapp/src/main/java/team/retum/jobisandroidv2/MainActivity.ktβ€Ž

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ import android.os.Bundle
44
import androidx.activity.ComponentActivity
55
import androidx.activity.compose.BackHandler
66
import androidx.activity.compose.setContent
7+
import androidx.activity.result.contract.ActivityResultContracts
78
import androidx.core.view.WindowCompat
89
import androidx.lifecycle.lifecycleScope
910
import com.github.anrwatchdog.ANRWatchDog
1011
import com.google.android.play.core.appupdate.AppUpdateManagerFactory
12+
import com.google.android.play.core.appupdate.AppUpdateOptions
1113
import com.google.android.play.core.install.model.AppUpdateType
1214
import com.google.android.play.core.install.model.UpdateAvailability
1315
import dagger.hilt.android.AndroidEntryPoint
@@ -28,6 +30,14 @@ class MainActivity : ComponentActivity() {
2830
@Inject
2931
lateinit var deviceTokenManager: DeviceTokenManager
3032

33+
private val updateLauncher = registerForActivityResult(
34+
ActivityResultContracts.StartIntentSenderForResult(),
35+
) { result ->
36+
if (result.resultCode != RESULT_OK) {
37+
// TODO :: μ—…λ°μ΄νŠΈ μ‹€νŒ¨ μ‹œ λͺ¨λ‹¬ 호좜
38+
}
39+
}
40+
3141
override fun onCreate(savedInstanceState: Bundle?) {
3242
super.onCreate(savedInstanceState)
3343
/**
@@ -68,17 +78,21 @@ class MainActivity : ComponentActivity() {
6878
val appUpdateManager = AppUpdateManagerFactory.create(this)
6979
val appUpdateInfoTask = appUpdateManager.appUpdateInfo
7080

71-
appUpdateInfoTask.addOnSuccessListener {
72-
val isUpdateAvailable = it.updateAvailability() == UpdateAvailability.UPDATE_AVAILABLE
73-
74-
if (isUpdateAvailable && it.isUpdateTypeAllowed(AppUpdateType.IMMEDIATE)) {
75-
appUpdateManager.startUpdateFlowForResult(
76-
it,
77-
AppUpdateType.IMMEDIATE,
78-
this,
79-
0,
80-
)
81+
appUpdateInfoTask.addOnSuccessListener { appUpdateInfo ->
82+
if (appUpdateInfo.updateAvailability() != UpdateAvailability.UPDATE_AVAILABLE) {
83+
return@addOnSuccessListener
8184
}
85+
86+
val updateOptions = AppUpdateOptions
87+
.newBuilder(AppUpdateType.IMMEDIATE)
88+
.setAllowAssetPackDeletion(true)
89+
.build()
90+
91+
appUpdateManager.startUpdateFlowForResult(
92+
appUpdateInfo,
93+
updateLauncher,
94+
updateOptions,
95+
)
8296
}
8397
}
8498
}
Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
[v2.4.0]
2-
β€’ 전년도 λͺ¨μ§‘μ˜λ’°λ₯Ό λ³Ό 수 μžˆμ–΄μš”!
1+
[v2.5.1]
2+
β€’ μžμž˜ν•œ μˆ˜μ •μ‚¬ν•­μ΄ μžˆμ–΄μš”
33

44
[ μƒˆλ‘œμš΄ κΈ°λŠ₯ ]
5-
- 전년도, λͺ¨μ§‘ μƒνƒœλ‘œ 필터링을 κ΅¬ν˜„ν–ˆμ–΄μš”
5+
-
66

77
[ κ°œμ„ λœ 점 ]
8-
-
8+
- μ—…λ°μ΄νŠΈ ν•„μš” μ‹œ μ•± λ‚΄λΆ€μ—μ„œ λ°”λ‘œ μ—…λ°μ΄νŠΈ 적용
9+
- ν›„κΈ° 필터링 μ‹œ 연도 쀑볡 선택이 κ°€λŠ₯ν•΄μš”!
910

1011
[ 버그 μˆ˜μ • ]
11-
β€’
12+
β€’

β€ŽbuildSrc/src/main/kotlin/ProjectProperties.ktβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ object ProjectProperties {
22
const val COMPILE_SDK = 36
33
const val MIN_SDK = 28
44
const val TARGET_SDK = 36
5-
const val VERSION_CODE = 32
6-
const val VERSION_NAME = "2.5.0"
5+
const val VERSION_CODE = 33
6+
const val VERSION_NAME = "2.5.1"
77
const val COMPOSE_COMPILER_EXTENSION = "1.5.6"
88
const val JVM_TARGET = "18"
99
}
Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
package team.retum.common.enums
22

3-
enum class InterviewLocation {
4-
DAEJEON,
5-
SEOUL,
6-
GYEONGGI,
7-
OTHER,
3+
enum class InterviewLocation(
4+
val value: String,
5+
) {
6+
DAEJEON("λŒ€μ „"),
7+
SEOUL("μ„œμšΈ"),
8+
GYEONGGI("κ²½κΈ°"),
9+
OTHER("기타"),
810
}
Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
package team.retum.common.enums
22

3-
enum class InterviewType {
4-
INDIVIDUAL,
5-
GROUP,
6-
OTHER,
3+
enum class InterviewType(
4+
val value: String,
5+
) {
6+
INDIVIDUAL("개인 λ©΄μ ‘"),
7+
GROUP("단체 λ©΄μ ‘"),
8+
OTHER("기타 λ©΄μ ‘"),
79
}

β€Žcore/data/src/main/java/team/retum/data/repository/review/ReviewRepository.ktβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ interface ReviewRepository {
1818
interviewType: InterviewType?,
1919
companyId: Long?,
2020
keyword: String?,
21-
year: Int?,
21+
year: List<Int>?,
2222
code: Long?,
2323
): FetchReviewsResponse
2424

@@ -30,7 +30,7 @@ interface ReviewRepository {
3030
location: InterviewLocation?,
3131
interviewType: InterviewType?,
3232
keyword: String?,
33-
year: Int?,
33+
year: List<Int>?,
3434
code: Long?,
3535
): FetchReviewsCountResponse
3636

β€Žcore/data/src/main/java/team/retum/data/repository/review/ReviewRepositoryImpl.ktβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class ReviewRepositoryImpl @Inject constructor(
2323
interviewType: InterviewType?,
2424
companyId: Long?,
2525
keyword: String?,
26-
year: Int?,
26+
year: List<Int>?,
2727
code: Long?,
2828
): FetchReviewsResponse =
2929
reviewDataSource.fetchReviews(
@@ -46,7 +46,7 @@ class ReviewRepositoryImpl @Inject constructor(
4646
location: InterviewLocation?,
4747
interviewType: InterviewType?,
4848
keyword: String?,
49-
year: Int?,
49+
year: List<Int>?,
5050
code: Long?,
5151
): FetchReviewsCountResponse =
5252
reviewDataSource.fetchReviewsCount(
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
package team.retum.jobisdesignsystemv2.chip
2+
3+
import androidx.compose.animation.animateColorAsState
4+
import androidx.compose.foundation.background
5+
import androidx.compose.foundation.layout.Box
6+
import androidx.compose.foundation.layout.padding
7+
import androidx.compose.foundation.shape.RoundedCornerShape
8+
import androidx.compose.runtime.Composable
9+
import androidx.compose.runtime.getValue
10+
import androidx.compose.ui.Alignment
11+
import androidx.compose.ui.Modifier
12+
import androidx.compose.ui.draw.clip
13+
import androidx.compose.ui.unit.dp
14+
import team.retum.jobisdesignsystemv2.foundation.JobisTheme
15+
import team.retum.jobisdesignsystemv2.foundation.JobisTypography
16+
import team.retum.jobisdesignsystemv2.text.JobisText
17+
import team.retum.jobisdesignsystemv2.utils.clickable
18+
19+
/**
20+
* This composable function creates a JobisChip element for use in Jobis.
21+
*
22+
* @param text Text to be displayed on the chip
23+
* @param selected Whether the chip is selected
24+
* @param onClick Called when this chip is clicked
25+
* @param modifier The modifier to be applied to the JobisChip
26+
*/
27+
@Composable
28+
fun JobisChip(
29+
modifier: Modifier = Modifier,
30+
text: String,
31+
selected: Boolean,
32+
onClick: () -> Unit,
33+
) {
34+
val background by animateColorAsState(
35+
targetValue = if (selected) JobisTheme.colors.onPrimary else JobisTheme.colors.inverseSurface,
36+
label = "",
37+
)
38+
val textColor by animateColorAsState(
39+
targetValue = if (selected) JobisTheme.colors.background else JobisTheme.colors.onPrimaryContainer,
40+
label = "",
41+
)
42+
43+
Box(
44+
modifier = modifier
45+
.clickable(
46+
enabled = true,
47+
onClick = onClick,
48+
onPressed = {},
49+
)
50+
.clip(RoundedCornerShape(30.dp))
51+
.background(background),
52+
contentAlignment = Alignment.Center,
53+
) {
54+
JobisText(
55+
modifier = Modifier.padding(
56+
horizontal = 12.dp,
57+
vertical = 4.dp,
58+
),
59+
text = text,
60+
style = JobisTypography.Body,
61+
color = textColor,
62+
)
63+
}
64+
}
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
package team.retum.jobisdesignsystemv2.chip
2+
3+
import androidx.compose.foundation.layout.Arrangement
4+
import androidx.compose.foundation.layout.Column
5+
import androidx.compose.foundation.layout.ExperimentalLayoutApi
6+
import androidx.compose.foundation.layout.FlowRow
7+
import androidx.compose.foundation.layout.padding
8+
import androidx.compose.runtime.Composable
9+
import androidx.compose.ui.Modifier
10+
import androidx.compose.ui.unit.dp
11+
import kotlinx.collections.immutable.ImmutableList
12+
import team.retum.jobisdesignsystemv2.foundation.JobisTheme
13+
import team.retum.jobisdesignsystemv2.foundation.JobisTypography
14+
import team.retum.jobisdesignsystemv2.text.JobisText
15+
16+
@OptIn(ExperimentalLayoutApi::class)
17+
@Composable
18+
fun <T> JobisChipGroup(
19+
title: String,
20+
items: ImmutableList<T>,
21+
itemText: (T) -> String,
22+
selectedItem: T?,
23+
onItemClick: (T) -> Unit,
24+
maxItemsInEachRow: Int = 5,
25+
) {
26+
Column(
27+
modifier = Modifier.padding(horizontal = 24.dp),
28+
) {
29+
if (title.isNotBlank()) {
30+
JobisText(
31+
modifier = Modifier.padding(vertical = 8.dp),
32+
text = title,
33+
style = JobisTypography.SubHeadLine,
34+
color = JobisTheme.colors.inverseOnSurface,
35+
)
36+
}
37+
FlowRow(
38+
horizontalArrangement = Arrangement.spacedBy(8.dp),
39+
verticalArrangement = Arrangement.spacedBy(8.dp),
40+
maxItemsInEachRow = maxItemsInEachRow,
41+
) {
42+
items.forEach { item ->
43+
JobisChip(
44+
text = itemText(item),
45+
selected = selectedItem == item,
46+
onClick = { onItemClick(item) },
47+
)
48+
}
49+
}
50+
}
51+
}

β€Žcore/design-system/src/main/java/team/retum/jobisdesignsystemv2/skills/Skills.ktβ€Ž

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,15 @@ import team.retum.jobisdesignsystemv2.utils.clickable
1919

2020
@Composable
2121
fun Skills(
22+
modifier: Modifier = Modifier,
2223
skills: SnapshotStateList<String>,
2324
checkSkillsId: ImmutableList<Long>? = null,
2425
checkedSkills: ImmutableList<String>,
2526
onCheckedChange: (String, Boolean, Long) -> Unit,
2627
) {
27-
LazyColumn {
28+
LazyColumn(
29+
modifier = modifier,
30+
) {
2831
items(skills.size) { skill ->
2932
val checked = checkedSkills.contains(skills[skill])
3033
SkillContent(

0 commit comments

Comments
Β (0)