Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ android {
applicationId = "com.doyoonkim.knutice"
minSdk = 31
targetSdk = 35
versionCode = 26
versionCode = 27
versionName = "1.5.0"

testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
Expand Down
2 changes: 2 additions & 0 deletions common/src/main/res/values-ja/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,6 @@
<string name="employment_news">就職</string>
<string name="error_submission_unavailable">提出できません.</string>
<string name="error_submission_unavailable_description">リクエストの処理中にエラーが発生しました。</string>
<string name="employment_notification_channel_name">就職アラム</string>
<string name="employment_notification_channel_descrption">新しい就職公知があればアラムを取りたい</string>
</resources>
10 changes: 6 additions & 4 deletions common/src/main/res/values-ko-rKR/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@
<string name="scholarship_notification_channel_name">장학 공지 알림</string>
<string name="academic_notification_channel_name">학사 공지 알림</string>
<string name="event_notification_channel_name">행사 공지 알림</string>
<string name="general_notification_channel_description">새로운 일반 공지가 올라오면 알림을 받을래요.</string>
<string name="scholarship_notification_channel_description">새로운 장학 공지가 올라오면 알림을 받을래요.</string>
<string name="academic_notification_channel_description">새로운 학사 공지가 올라오면 알림을 받을래요.</string>
<string name="event_notification_channel_description">새로운 행사 공지가 올라오면 알림을 받을래요.</string>
<string name="general_notification_channel_description">헉교의 주요 공지와 다양한 소식을 알려드려요</string>
<string name="scholarship_notification_channel_description">수강, 성적, 졸업 등 학사 운영과 관련된 다양한 소식을 알려드려요</string>
<string name="academic_notification_channel_description">장학금의 신청 자격, 절차, 일정 등과 관련된 다양한 소식을 알랴드려요</string>
<string name="event_notification_channel_description">학교에서 진행되는 각종 교육, 문화, 진로 등 다양한 소식을 알려드려요</string>
<string name="title_notification_pref">알림 설정</string>
<string name="subtitle_set_reminder">알림 설정하기</string>
<string name="title_edit_bookmark">북마크 수정</string>
Expand Down Expand Up @@ -89,4 +89,6 @@
<string name="employment_news">취업공지</string>
<string name="error_submission_unavailable">오류가 발생했습니다.</string>
<string name="error_submission_unavailable_description">요청을 처리하는 중 오류가 발생했어요.</string>
<string name="employment_notification_channel_name">취업 공지 알림</string>
<string name="employment_notification_channel_descrption">채용 정보, 취업 지원 프로그램, 진로 상담 등 학생들의 진로 설계를 돕기 위한 소식을 알려드려요</string>
</resources>
2 changes: 2 additions & 0 deletions common/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,6 @@
<string name="employment_news">Career News</string>
<string name="error_submission_unavailable">Submission Unavailable</string>
<string name="error_submission_unavailable_description">Error occurred while processing your request.</string>
<string name="employment_notification_channel_name">Career Notices</string>
<string name="employment_notification_channel_descrption">Get push notification when new career notice is being posted.</string>
</resources>
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ fun NotificationPreferencesScreen(
subTitleText = stringResource(R.string.event_notification_channel_description),
primaryColor = MaterialTheme.colorScheme.title,
secondaryColor = MaterialTheme.colorScheme.subTitle,
hasBottomDivider = false
hasBottomDivider = true
) {
Switch(
checked = uiStatus.isEachChannelAllowed[3],
Expand All @@ -214,7 +214,30 @@ fun NotificationPreferencesScreen(
enabled = uiStatus.isMainNotificationPermissionGranted && uiStatus.isSyncCompleted
)
}

RoundedCornerColumnTextItemWithExtraOnRight(
modifier = Modifier.padding(start = 10.dp),
verticalPadding = 15.dp,
titleText = stringResource(R.string.employment_notification_channel_name),
subTitleText = stringResource(R.string.employment_notification_channel_descrption),
primaryColor = MaterialTheme.colorScheme.title,
secondaryColor = MaterialTheme.colorScheme.subTitle,
hasBottomDivider = false
) {
Switch(
checked = uiStatus.isEachChannelAllowed[4],
colors = SwitchDefaults.colors().copy(
checkedTrackColor = MaterialTheme.colorScheme.variantPurple,
checkedThumbColor = Color.White
),
onCheckedChange = {
viewModel.updateChannelPreferenceState(4, it)
},
enabled = uiStatus.isMainNotificationPermissionGranted && uiStatus.isSyncCompleted
)
}
}

if (!uiStatus.isSyncCompleted) {
Box(
modifier = Modifier.fillMaxSize()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ class NotificationPreferencesViewModel @Inject constructor(
0 to NoticeCategory.GENERAL_NEWS,
1 to NoticeCategory.ACADEMIC_NEWS,
2 to NoticeCategory.SCHOLARSHIP_NEWS,
3 to NoticeCategory.EVENT_NEWS
3 to NoticeCategory.EVENT_NEWS,
4 to NoticeCategory.EMPLOYMENT_NEWS
)

fun updateMainNotificationPermissionStatus(status: Boolean) =
Expand Down Expand Up @@ -93,7 +94,8 @@ class NotificationPreferencesViewModel @Inject constructor(
status.general,
status.academic,
status.scholarship,
status.event
status.event,
status.employment
),
isSyncCompleted = true,
isError = false
Expand Down Expand Up @@ -122,7 +124,7 @@ class NotificationPreferencesViewModel @Inject constructor(

data class NotificationPreferencesState(
val isMainNotificationPermissionGranted: Boolean = false,
val isEachChannelAllowed: List<Boolean> = listOf(false, false, false, false),
val isEachChannelAllowed: List<Boolean> = listOf(false, false, false, false, false),
val isSyncCompleted: Boolean = false,
val isError: Boolean = false
)
Loading