1
1
package com.threegap.bitnagil.presentation.setting
2
2
3
3
import androidx.compose.foundation.background
4
- import androidx.compose.foundation.clickable
5
4
import androidx.compose.foundation.layout.Arrangement
6
5
import androidx.compose.foundation.layout.Column
7
6
import androidx.compose.foundation.layout.Row
@@ -27,6 +26,7 @@ import androidx.hilt.navigation.compose.hiltViewModel
27
26
import com.threegap.bitnagil.designsystem.BitnagilTheme
28
27
import com.threegap.bitnagil.designsystem.component.block.BitnagilOptionButton
29
28
import com.threegap.bitnagil.designsystem.component.block.BitnagilTopBar
29
+ import com.threegap.bitnagil.designsystem.modifier.clickableWithoutRipple
30
30
import com.threegap.bitnagil.presentation.common.flow.collectAsEffect
31
31
import com.threegap.bitnagil.presentation.setting.component.atom.settingtitle.SettingTitle
32
32
import com.threegap.bitnagil.presentation.setting.component.block.ConfirmDialog
@@ -116,38 +116,28 @@ private fun SettingScreen(
116
116
Text (
117
117
text = " 버전 " ,
118
118
color = BitnagilTheme .colors.black,
119
- style = BitnagilTheme .typography.body1Regular ,
119
+ style = BitnagilTheme .typography.body1Medium ,
120
120
)
121
121
Text (
122
122
text = state.version,
123
123
color = BitnagilTheme .colors.black,
124
124
style = BitnagilTheme .typography.body1SemiBold,
125
125
)
126
126
}
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
+ )
151
141
}
152
142
153
143
BitnagilOptionButton (
0 commit comments