Skip to content

Commit c670d3b

Browse files
committed
๐Ÿ› ๏ธ :: ์•Œ๋ฆผ ์„ค์ • ๋กœ์ง ์ˆ˜์ • ๋ฐ ์ฝ”๋“œ ๋ฆฌํŽ™ํ† ๋ง
1 parent ae9ebdc commit c670d3b

File tree

3 files changed

+6
-20
lines changed

3 files changed

+6
-20
lines changed

โ€ŽProjects/Presentation/Sources/NotificationSetting/Component/NotificationSectionView.swiftโ€Ž

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@ public final class NotificationSectionView: BaseView {
4646
}
4747
}
4848

49-
public override func configureView() {}
50-
5149
func setTitleLabel(text: String) {
5250
self.notificationTitleLabel.text = text
5351
}

โ€ŽProjects/Presentation/Sources/NotificationSetting/NotificationSettingViewController.swiftโ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -163,8 +163,8 @@ public final class NotificationSettingViewController: BaseViewController<Notific
163163

164164
private func toggleButton() {
165165
if (
166-
noticeSwitchView.switchIsOn &&
167-
applicationSwitchView.switchIsOn &&
166+
noticeSwitchView.switchIsOn ||
167+
applicationSwitchView.switchIsOn ||
168168
recruitmentSwitchView.switchIsOn
169169
) == true {
170170
self.allNotificationSwitchView.setup(isOn: true)

โ€ŽProjects/Presentation/Sources/NotificationSetting/NotificationSettingViewModel.swiftโ€Ž

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -61,28 +61,16 @@ public final class NotificationSettingViewModel: BaseViewModel, Stepper {
6161
for state in $0 {
6262
if state.topic == .notice {
6363
subscribeNoticeState.accept(state)
64-
if state.isSubscribed {
65-
noticeState.accept(true)
66-
} else {
67-
noticeState.accept(false)
68-
}
64+
noticeState.accept(state.isSubscribed)
6965
} else if state.topic == .application {
7066
subscribeApplicationState.accept(state)
71-
if state.isSubscribed {
72-
applicationState.accept(true)
73-
} else {
74-
applicationState.accept(false)
75-
}
67+
applicationState.accept(state.isSubscribed)
7668
} else if state.topic == .recruitment {
7769
subscribeRecruitmentState.accept(state)
78-
if state.isSubscribed {
79-
recruitmentState.accept(true)
80-
} else {
81-
recruitmentState.accept(false)
82-
}
70+
recruitmentState.accept(state.isSubscribed)
8371
}
8472

85-
if noticeState.value && applicationState.value && recruitmentState.value {
73+
if noticeState.value || applicationState.value || recruitmentState.value {
8674
allSubscribeState.accept(true)
8775
} else {
8876
allSubscribeState.accept(false)

0 commit comments

Comments
ย (0)