Skip to content

Commit

Permalink
๐Ÿ”— :: (#390) ๊ฒจ์šธ์ธํ„ด ์•Œ๋ฆผ ์„ค์ • ์ถ”๊ฐ€
Browse files Browse the repository at this point in the history
  • Loading branch information
parkuiery authored Oct 15, 2024
2 parents ebf87d5 + 09d4779 commit 360261f
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
package team.retum.common.enums

enum class NotificationTopic {
APPLICATION_STATUS_CHANGED, RECRUITMENT_DONE, NEW_NOTICE, NEW_INTERESTED_RECRUITMENT,
APPLICATION_STATUS_CHANGED, RECRUITMENT_DONE, NEW_NOTICE, NEW_INTERESTED_RECRUITMENT, WINTER_INTERN_STATUS_CHANGED,
}
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,12 @@ private fun NotificationSettingScreen(
isSubscribe = state.isRecruitmentSubscribe,
onCheckChange = onTopicChange,
)
NotificationDetailLayout(
title = stringResource(id = R.string.winter_intern_notification),
topic = NotificationTopic.WINTER_INTERN_STATUS_CHANGED,
isSubscribe = state.isWinterInternSubscribe,
onCheckChange = onTopicChange,
)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ internal class NotificationSettingViewModel @Inject constructor(
isNoticeSubscribe = isSubscribed,
isRecruitmentSubscribe = isSubscribed,
isApplicationSubscribe = isSubscribed,
isWinterInternSubscribe = isSubscribed,
)
}
}
Expand Down Expand Up @@ -98,13 +99,14 @@ internal class NotificationSettingViewModel @Inject constructor(
NotificationTopic.NEW_NOTICE -> copy(isNoticeSubscribe = isSubscribed)
NotificationTopic.APPLICATION_STATUS_CHANGED -> copy(isApplicationSubscribe = isSubscribed)
NotificationTopic.RECRUITMENT_DONE -> copy(isRecruitmentSubscribe = isSubscribed)
NotificationTopic.WINTER_INTERN_STATUS_CHANGED -> copy(isWinterInternSubscribe = isSubscribed)
NotificationTopic.NEW_INTERESTED_RECRUITMENT -> copy()
}
setState { subscribeState }
}
with(state.value) {
val isAllSubscribe =
isNoticeSubscribe && isApplicationSubscribe && isRecruitmentSubscribe
isNoticeSubscribe && isApplicationSubscribe && isRecruitmentSubscribe && isWinterInternSubscribe
setState { copy(isAllSubscribe = isAllSubscribe) }
}
}
Expand All @@ -116,6 +118,7 @@ internal data class NotificationSettingState(
val isNoticeSubscribe: Boolean,
val isApplicationSubscribe: Boolean,
val isRecruitmentSubscribe: Boolean,
val isWinterInternSubscribe: Boolean,
) {
companion object {
fun getDefaultState() = NotificationSettingState(
Expand All @@ -124,6 +127,7 @@ internal data class NotificationSettingState(
isNoticeSubscribe = true,
isApplicationSubscribe = true,
isRecruitmentSubscribe = true,
isWinterInternSubscribe = true,
)
}
}
Expand Down
1 change: 1 addition & 0 deletions feature/notification/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
<string name="notice_notification">๊ณต์ง€์‚ฌํ•ญ ์•Œ๋ฆผ</string>
<string name="application_notification">์ง€์›์„œ ์•Œ๋ฆผ</string>
<string name="recruitment_notification">๋ชจ์ง‘์˜๋ขฐ์„œ ์•Œ๋ฆผ</string>
<string name="winter_intern_notification">๊ฒจ์šธ์ธํ„ด ์•Œ๋ฆผ</string>
<string name="cannot_current_notification_status">์„ค์ •๋œ ์•Œ๋ฆผ์„ ๊ฐ€์ ธ์˜ค์ง€ ๋ชปํ–ˆ์–ด์š”</string>
<string name="change_notification_fail">์•Œ๋ฆผ์„ ๋ณ€๊ฒฝ์— ์‹คํŒจํ–ˆ์–ด์š”</string>
<string name="no_notification">์•„์ง ์•Œ๋ฆผ์ด ์—†์–ด์š”</string>
Expand Down

0 comments on commit 360261f

Please sign in to comment.