11package com.threegap.bitnagil.presentation.setting
22
33import androidx.compose.foundation.background
4- import androidx.compose.foundation.clickable
54import androidx.compose.foundation.layout.Arrangement
65import androidx.compose.foundation.layout.Column
76import androidx.compose.foundation.layout.Row
@@ -27,6 +26,7 @@ import androidx.hilt.navigation.compose.hiltViewModel
2726import com.threegap.bitnagil.designsystem.BitnagilTheme
2827import com.threegap.bitnagil.designsystem.component.block.BitnagilOptionButton
2928import com.threegap.bitnagil.designsystem.component.block.BitnagilTopBar
29+ import com.threegap.bitnagil.designsystem.modifier.clickableWithoutRipple
3030import com.threegap.bitnagil.presentation.common.flow.collectAsEffect
3131import com.threegap.bitnagil.presentation.setting.component.atom.settingtitle.SettingTitle
3232import com.threegap.bitnagil.presentation.setting.component.block.ConfirmDialog
@@ -116,38 +116,28 @@ private fun SettingScreen(
116116 Text (
117117 text = " 버전 " ,
118118 color = BitnagilTheme .colors.black,
119- style = BitnagilTheme .typography.body1Regular ,
119+ style = BitnagilTheme .typography.body1Medium ,
120120 )
121121 Text (
122122 text = state.version,
123123 color = BitnagilTheme .colors.black,
124124 style = BitnagilTheme .typography.body1SemiBold,
125125 )
126126 }
127- if (state.version == state.latestVersion) {
128- Text (
129- " 최신" ,
130- modifier = Modifier
131- .background(
132- color = BitnagilTheme .colors.coolGray98,
133- shape = RoundedCornerShape (4 .dp),
134- )
135- .padding(horizontal = 10 .dp, vertical = 5 .dp),
136- style = BitnagilTheme .typography.button2.copy(color = BitnagilTheme .colors.coolGray70),
137- )
138- } else {
139- Text (
140- " 업데이트" ,
141- modifier = Modifier
142- .background(
143- color = BitnagilTheme .colors.lightBlue200,
144- shape = RoundedCornerShape (4 .dp),
145- )
146- .clickable(onClick = onClickUpdate)
147- .padding(horizontal = 10 .dp, vertical = 5 .dp),
148- style = BitnagilTheme .typography.button2.copy(color = BitnagilTheme .colors.navy500),
149- )
150- }
127+
128+ val isLatest = state.version == state.latestVersion
129+ Text (
130+ text = if (isLatest) " 최신" else " 업데이트" ,
131+ color = if (isLatest) BitnagilTheme .colors.coolGray70 else BitnagilTheme .colors.orange500,
132+ style = BitnagilTheme .typography.button2,
133+ modifier = Modifier
134+ .background(
135+ color = if (isLatest) BitnagilTheme .colors.coolGray98 else BitnagilTheme .colors.orange50,
136+ shape = RoundedCornerShape (8 .dp),
137+ )
138+ .let { if (! isLatest) it.clickableWithoutRipple(onClick = onClickUpdate) else it }
139+ .padding(horizontal = 10 .dp, vertical = 5 .dp),
140+ )
151141 }
152142
153143 BitnagilOptionButton (
0 commit comments