Skip to content

Commit c900535

Browse files
committed
refactor :: 렌더링 시점 전에 테마 지정하도록 적용
1 parent 6af620c commit c900535

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

app/src/main/kotlin/team/aliens/dms/android/app/MainActivityViewModel.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import dagger.hilt.android.lifecycle.HiltViewModel
66
import kotlinx.coroutines.flow.MutableStateFlow
77
import kotlinx.coroutines.flow.StateFlow
88
import kotlinx.coroutines.flow.asStateFlow
9+
import kotlinx.coroutines.flow.first
910
import kotlinx.coroutines.launch
1011
import team.aliens.dms.android.core.jwt.JwtProvider
1112
import team.aliens.dms.android.core.theme.ThemeMode
@@ -38,6 +39,7 @@ class MainActivityViewModel @Inject constructor(
3839
viewModelScope.launch {
3940
runCatchingCancellable { jwtProvider.resolveSession() }
4041
_isOnboardingCompleted.value = onboardingDataSource.getOnboardingCompleted()
42+
_themeMode.value = themeDataStoreDataSource.getThemeModeFlow().first()
4143
_isStartupResolved.value = true
4244
}
4345
viewModelScope.launch {

0 commit comments

Comments
 (0)