We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bc02512 commit c33f277Copy full SHA for c33f277
1 file changed
DevLog/UI/Setting/SettingView.swift
@@ -35,17 +35,19 @@ struct SettingView: View {
35
.foregroundStyle(Color.primary)
36
}
37
38
+ let dirSize = viewModel.state.dirSize
39
Button {
40
viewModel.send(.tapRemoveCacheButton)
41
} label: {
42
HStack {
43
Text("임시 데이터 삭제")
- .foregroundStyle(Color.primary)
44
+ .foregroundStyle(dirSize == 0 ? Color.secondary : .primary)
45
Spacer()
- Text(formatFileSize(bytes: viewModel.state.dirSize))
46
- .foregroundStyle(Color.secondary)
+ Text(formatFileSize(bytes: dirSize))
47
+ .foregroundStyle(Color.secondary.opacity(dirSize == 0 ? 0 : 1))
48
49
50
+ .disabled(dirSize == 0)
51
52
53
Section {
0 commit comments