Skip to content

Commit 814e32e

Browse files
committed
refactor: 낙관적 업데이트로 인한 체크마크 선 표시 후 ProgressView가 뜨는 현상 해결
1 parent 23d21fa commit 814e32e

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

Application/DevLogPresentation/Sources/Settings/PushNotificationSettingsView.swift

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ struct PushNotificationSettingsView: View {
1919
Spacer()
2020
if store.isLoading && store.activeLoadingRow == .enable {
2121
ProgressView()
22-
.id(UUID())
2322
} else {
2423
Toggle("", isOn: $store.pushNotificationEnable)
2524
.labelsHidden()
@@ -40,9 +39,9 @@ struct PushNotificationSettingsView: View {
4039
if let loadingRow,
4140
store.isLoading && store.activeLoadingRow == loadingRow {
4241
ProgressView()
43-
.id(UUID())
44-
} else if store.pushNotificationHour == hour &&
45-
store.pushNotificationMinute == 0 {
42+
} else if store.activeLoadingRow != loadingRow
43+
&& store.pushNotificationHour == hour
44+
&& store.pushNotificationMinute == 0 {
4645
Image(systemName: "checkmark")
4746
.foregroundStyle(Color.blue)
4847
}
@@ -56,11 +55,11 @@ struct PushNotificationSettingsView: View {
5655
Spacer()
5756
if store.isLoading && store.activeLoadingRow == .customTime {
5857
ProgressView()
59-
.id(UUID())
6058
} else {
6159
Text(formattedTimeString(store.viewPushNotificationTime))
6260
.foregroundStyle(.secondary)
63-
if store.pushNotificationMinute != 0 {
61+
if store.activeLoadingRow != .customTime &&
62+
store.pushNotificationMinute != 0 {
6463
Image(systemName: "checkmark")
6564
.foregroundStyle(Color.blue)
6665
}

0 commit comments

Comments
 (0)