diff --git a/app/src/main/java/com/wafflestudio/snutt2/views/RootActivity.kt b/app/src/main/java/com/wafflestudio/snutt2/views/RootActivity.kt index 7ff38f1c9..dd2ca7524 100644 --- a/app/src/main/java/com/wafflestudio/snutt2/views/RootActivity.kt +++ b/app/src/main/java/com/wafflestudio/snutt2/views/RootActivity.kt @@ -389,7 +389,11 @@ class RootActivity : AppCompatActivity() { navController.getBackStackEntry(NavigationDestination.Home) } val themeListViewModel = hiltViewModel(parentEntry) - ThemeConfigPage(themeListViewModel) + val tableListViewModel = hiltViewModel(parentEntry) + ThemeConfigPage( + themeListViewModel = themeListViewModel, + tableListViewModel = tableListViewModel, + ) } if (BuildConfig.DEBUG) composable2(NavigationDestination.NetworkLog) { NetworkLogPage() } } diff --git a/app/src/main/java/com/wafflestudio/snutt2/views/logged_in/home/settings/theme/BuiltInThemeMoreActionBottomSheet.kt b/app/src/main/java/com/wafflestudio/snutt2/views/logged_in/home/settings/theme/BuiltInThemeMoreActionBottomSheet.kt index 054e3d702..433f34ed3 100644 --- a/app/src/main/java/com/wafflestudio/snutt2/views/logged_in/home/settings/theme/BuiltInThemeMoreActionBottomSheet.kt +++ b/app/src/main/java/com/wafflestudio/snutt2/views/logged_in/home/settings/theme/BuiltInThemeMoreActionBottomSheet.kt @@ -30,7 +30,7 @@ fun BuiltInThemeMoreActionBottomSheet( ) { Column( modifier = modifier - .background(MaterialTheme.colors.background) + .background(MaterialTheme.colors.surface) .padding(vertical = 12.dp) .fillMaxWidth(), ) { diff --git a/app/src/main/java/com/wafflestudio/snutt2/views/logged_in/home/settings/theme/CustomThemeMoreActionBottomSheet.kt b/app/src/main/java/com/wafflestudio/snutt2/views/logged_in/home/settings/theme/CustomThemeMoreActionBottomSheet.kt index 2970631ef..fca5cbd17 100644 --- a/app/src/main/java/com/wafflestudio/snutt2/views/logged_in/home/settings/theme/CustomThemeMoreActionBottomSheet.kt +++ b/app/src/main/java/com/wafflestudio/snutt2/views/logged_in/home/settings/theme/CustomThemeMoreActionBottomSheet.kt @@ -33,7 +33,7 @@ fun CustomThemeMoreActionBottomSheet( ) { Column( modifier = modifier - .background(MaterialTheme.colors.background) + .background(MaterialTheme.colors.surface) .padding(vertical = 12.dp) .fillMaxWidth(), ) { diff --git a/app/src/main/java/com/wafflestudio/snutt2/views/logged_in/home/settings/theme/ThemeConfigPage.kt b/app/src/main/java/com/wafflestudio/snutt2/views/logged_in/home/settings/theme/ThemeConfigPage.kt index 67fb55551..15d16e68f 100644 --- a/app/src/main/java/com/wafflestudio/snutt2/views/logged_in/home/settings/theme/ThemeConfigPage.kt +++ b/app/src/main/java/com/wafflestudio/snutt2/views/logged_in/home/settings/theme/ThemeConfigPage.kt @@ -62,7 +62,9 @@ import com.wafflestudio.snutt2.views.LocalModalState import com.wafflestudio.snutt2.views.LocalNavController import com.wafflestudio.snutt2.views.NavigationDestination import com.wafflestudio.snutt2.views.launchSuspendApi +import com.wafflestudio.snutt2.views.logged_in.home.TableListViewModel import com.wafflestudio.snutt2.views.logged_in.home.settings.SettingColumn +import com.wafflestudio.snutt2.views.logged_in.home.timetable.TimetableViewModel import kotlinx.coroutines.flow.filterNotNull import kotlinx.coroutines.launch @@ -70,6 +72,8 @@ import kotlinx.coroutines.launch @Composable fun ThemeConfigPage( themeListViewModel: ThemeListViewModel = hiltViewModel(), + timetableViewModel: TimetableViewModel = hiltViewModel(), + tableListViewModel: TableListViewModel = hiltViewModel(), // NavigationDestination.HOME에 scope된 viewmodel ) { val navController = LocalNavController.current val modalState = LocalModalState.current @@ -83,6 +87,7 @@ fun ThemeConfigPage( val customThemes by themeListViewModel.customThemes.collectAsState() val builtInThemes by themeListViewModel.builtInThemes.collectAsState() + val table by timetableViewModel.currentTable.collectAsState() val onBackPressed: () -> Unit = { if (bottomSheet.isVisible) { @@ -202,6 +207,12 @@ fun ThemeConfigPage( composableStates = composableStates, onConfirm = { themeListViewModel.deleteTheme(theme.id) + table?.let { + // 현재 선택된 시간표의 테마라면 서버에서 변경된 색 배치를 불러옴 + if (it.themeId != null && it.themeId == theme.id) { + tableListViewModel.changeSelectedTable(it.id) + } + } modalState.hide() bottomSheet.hide() }, diff --git a/app/src/main/java/com/wafflestudio/snutt2/views/logged_in/home/settings/theme/ThemeDetailPage.kt b/app/src/main/java/com/wafflestudio/snutt2/views/logged_in/home/settings/theme/ThemeDetailPage.kt index d34437f02..7ec084fc3 100644 --- a/app/src/main/java/com/wafflestudio/snutt2/views/logged_in/home/settings/theme/ThemeDetailPage.kt +++ b/app/src/main/java/com/wafflestudio/snutt2/views/logged_in/home/settings/theme/ThemeDetailPage.kt @@ -269,7 +269,7 @@ fun ThemeDetailPage( }, colorFilter = ColorFilter.tint( (if (isDarkMode()) SNUTTColors.DarkGray else SNUTTColors.Gray40).copy( - alpha = if (editingColors.size > 1) 1f else 0.3f, + alpha = if (editingColors.size in 2..8) 1f else 0.3f, ), ), ) diff --git a/app/src/main/java/com/wafflestudio/snutt2/views/logged_in/notifications/NotificationPage.kt b/app/src/main/java/com/wafflestudio/snutt2/views/logged_in/notifications/NotificationPage.kt index 698062864..58f580ebb 100644 --- a/app/src/main/java/com/wafflestudio/snutt2/views/logged_in/notifications/NotificationPage.kt +++ b/app/src/main/java/com/wafflestudio/snutt2/views/logged_in/notifications/NotificationPage.kt @@ -135,11 +135,11 @@ fun NotificationItem(info: NotificationDto) { modifier = Modifier.padding(top = 4.dp, bottom = 7.dp), ) { Row(modifier = Modifier.fillMaxWidth()) { - Text(text = info.title, style = SNUTTTypography.h4.copy(fontWeight = FontWeight.SemiBold)) + Text(text = info.title, style = SNUTTTypography.h4.copy(fontSize = 13.sp, fontWeight = FontWeight.SemiBold)) Spacer(modifier = Modifier.weight(1f)) Text( text = getNotificationTime(context, info), - style = SNUTTTypography.body1.copy(color = SNUTTColors.Gray2), + style = SNUTTTypography.body1.copy(fontSize = 13.sp, color = SNUTTColors.Gray2), maxLines = 1, overflow = TextOverflow.Ellipsis, ) @@ -147,7 +147,7 @@ fun NotificationItem(info: NotificationDto) { Spacer(modifier = Modifier.height(6.dp)) Text( text = info.message, - style = SNUTTTypography.body1.copy(lineHeight = 18.2.sp), + style = SNUTTTypography.body1.copy(fontSize = 13.sp, lineHeight = 18.2.sp), ) } } diff --git a/version.properties b/version.properties index da1b61d9c..635017428 100644 --- a/version.properties +++ b/version.properties @@ -1 +1 @@ -snuttVersionName=3.4.1 +snuttVersionName=3.5.0