Skip to content

feat: Remote Config 기반 앱 테마 전환 추가#516

Merged
PeraSite merged 8 commits intodevelopfrom
feat/app-theme
Apr 9, 2026
Merged

feat: Remote Config 기반 앱 테마 전환 추가#516
PeraSite merged 8 commits intodevelopfrom
feat/app-theme

Conversation

@PeraSite
Copy link
Copy Markdown
Member

@PeraSite PeraSite commented Apr 9, 2026

What changed

  • Firebase Remote Config의 app_theme 값을 기반으로 인트로 스플래시 테마를 전환하도록 추가했습니다.
  • AppThemeAppThemePreference를 도입해 마지막으로 불러온 테마를 저장하고, 다음 실행 시 초기 스플래시에 반영되도록 했습니다.
  • launcher alias를 추가해 릴리즈 빌드에서 앱 아이콘도 시즌 테마에 맞춰 전환할 수 있도록 구성했습니다.
  • 봄 시즌 명칭을 spring으로 통일하고 관련 리소스와 참조를 정리했습니다.
SCR-20260409-mjgr image

Why

  • Remote Config로 시즌성 브랜딩 요소를 서버에서 제어할 수 있게 하려는 목적입니다.
  • 앱 재실행 시에도 직전 테마를 바로 보여줘 첫 진입 경험을 자연스럽게 유지하려고 했습니다.

Impact

  • debug 빌드에서는 IDE 실행 안정성을 위해 launcher icon switching은 비활성화됩니다.
  • release 빌드에서는 Remote Config 값에 따라 스플래시와 앱 아이콘이 함께 바뀝니다.

@PeraSite PeraSite changed the title [codex] Remote Config 기반 앱 테마 전환 추가 feat: Remote Config 기반 앱 테마 전환 추가 Apr 9, 2026
@PeraSite PeraSite marked this pull request as ready for review April 9, 2026 06:22
Copilot AI review requested due to automatic review settings April 9, 2026 06:22
@PeraSite PeraSite self-assigned this Apr 9, 2026
@PeraSite PeraSite requested review from HI-JIN2 and chlwhdtn03 April 9, 2026 06:22
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request implements a dynamic app theme and launcher icon switching system using Firebase Remote Config and DataStore. It introduces themed activity aliases in the Android manifest and logic in the intro screen to synchronize and apply these themes. Review feedback identifies significant performance risks: the use of runBlocking in the DataStore access may cause ANR issues during app startup, and the launcher icon synchronization involves heavy IPC operations that should be moved to a background thread and optimized to avoid redundant updates.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Firebase Remote Config의 app_theme 값을 기반으로 인트로 스플래시(배경/로고)와(릴리즈 한정) 런처 아이콘까지 시즌 테마로 전환할 수 있게 하고, 마지막 테마를 로컬에 저장해 다음 실행 시 즉시 반영되도록 확장한 PR입니다.

Changes:

  • Remote Config 기본값에 app_theme 추가 및 AppTheme(도메인) 도입
  • AppThemeDataStore로 마지막 테마 로컬 저장/복원, Intro에서 테마 적용 및 아이콘 alias 토글
  • Spring 런처 아이콘 리소스/Adaptive icon 추가 및 Manifest에 launcher alias 구성

Reviewed changes

Copilot reviewed 11 out of 30 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
app/src/main/res/xml/firebase_remote_config.xml Remote Config 기본값에 app_theme 키 추가
app/src/main/res/mipmap-xxxhdpi/ic_launcher_spring.webp Spring 런처 아이콘(고해상도) 추가
app/src/main/res/mipmap-xxxhdpi/ic_launcher_spring_round.webp Spring 라운드 런처 아이콘(고해상도) 추가
app/src/main/res/mipmap-xxxhdpi/ic_launcher_spring_foreground.webp Spring adaptive icon foreground(고해상도) 추가
app/src/main/res/mipmap-xxhdpi/ic_launcher_spring.webp Spring 런처 아이콘(xxhdpi) 추가
app/src/main/res/mipmap-xxhdpi/ic_launcher_spring_round.webp Spring 라운드 런처 아이콘(xxhdpi) 추가
app/src/main/res/mipmap-xxhdpi/ic_launcher_spring_foreground.webp Spring adaptive icon foreground(xxhdpi) 추가
app/src/main/res/mipmap-xhdpi/ic_launcher_spring.webp Spring 런처 아이콘(xhdpi) 추가
app/src/main/res/mipmap-xhdpi/ic_launcher_spring_round.webp Spring 라운드 런처 아이콘(xhdpi) 추가
app/src/main/res/mipmap-xhdpi/ic_launcher_spring_foreground.webp Spring adaptive icon foreground(xhdpi) 추가
app/src/main/res/mipmap-mdpi/ic_launcher_spring.webp Spring 런처 아이콘(mdpi) 추가
app/src/main/res/mipmap-mdpi/ic_launcher_spring_round.webp Spring 라운드 런처 아이콘(mdpi) 추가
app/src/main/res/mipmap-mdpi/ic_launcher_spring_foreground.webp Spring adaptive icon foreground(mdpi) 추가
app/src/main/res/mipmap-hdpi/ic_launcher_spring.webp Spring 런처 아이콘(hdpi) 추가
app/src/main/res/mipmap-hdpi/ic_launcher_spring_round.webp Spring 라운드 런처 아이콘(hdpi) 추가
app/src/main/res/mipmap-hdpi/ic_launcher_spring_foreground.webp Spring adaptive icon foreground(hdpi) 추가
app/src/main/res/mipmap-anydpi-v26/ic_launcher_spring.xml Spring adaptive icon 정의(v26+) 추가
app/src/main/res/mipmap-anydpi-v26/ic_launcher_spring_round.xml Spring 라운드 adaptive icon 정의(v26+) 추가
app/src/main/res/layout/activity_intro.xml Intro 로고 ImageView에 id 추가(테마별 로고 변경용)
app/src/main/java/com/eatssu/android/presentation/intro/IntroViewModel.kt 앱 초기화 시 테마 동기화 및 테마 StateFlow 노출 추가
app/src/main/java/com/eatssu/android/presentation/intro/IntroActivity.kt 스플래시 테마 적용 및 릴리즈에서 런처 아이콘 alias 토글 추가
app/src/main/java/com/eatssu/android/domain/repository/FirebaseRemoteConfigRepository.kt Remote Config에서 AppTheme 조회 API 추가
app/src/main/java/com/eatssu/android/domain/model/AppTheme.kt 테마(remoteValue/스플래시 리소스/alias suffix) 모델 추가
app/src/main/java/com/eatssu/android/data/remote/repository/FirebaseRemoteConfigRepositoryImpl.kt getAppTheme() 구현 및 fetch 호출 공통화
app/src/main/java/com/eatssu/android/data/local/AppThemeDataStore.kt 마지막 테마를 DataStore에 저장/조회하는 컴포넌트 추가
app/src/main/AndroidManifest.xml 런처 진입점을 activity-alias로 전환하고 시즌 아이콘 alias 추가
Comments suppressed due to low confidence (1)

app/src/main/java/com/eatssu/android/presentation/intro/IntroViewModel.kt:67

  • initializeApp()에서 syncAppTheme()checkVersionUpdate()/autoLogin()보다 먼저 순차 실행하고 있어, Remote Config fetch가 느릴 경우 인트로 초기화 전체가 지연될 수 있습니다. 테마 동기화는 스플래시 UI 갱신 용도라면 다른 초기화 작업을 막지 않도록 별도 코루틴으로 병렬 실행(또는 fetch는 한 번만 수행 후 값만 읽기)하는 구성이 더 안전합니다.
    private fun initializeApp() {
        viewModelScope.launch {
            _uiState.value = UiState.Loading

            try {
                syncAppTheme()

                // 1. 버전 체크 (Firebase Remote Config는 자동으로 초기화됨)
                checkVersionUpdate()

                // 2. 자동 로그인 체크
                autoLogin()

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 32 to +44
override suspend fun getMinimumVersionCode(): Long {
// 값을 가져오기 전에 fetchAndActivate 호출
// min fetch interval이 지나지 않았으면 로컬 캐시를 사용하고, 지났으면 서버에서 가져옵니다.
try {
instance.fetchAndActivate().await()
} catch (e: Exception) {
Timber.e(e, "RemoteConfig fetchAndActivate 실패")
}
fetchAndActivateSafely()
return instance.getLong("android_version_code")
}

override suspend fun getAppTheme(): AppTheme {
fetchAndActivateSafely()
return AppTheme.fromStringOrDefault(instance.getString("app_theme"))
}

override suspend fun getRestaurantInfo(restaurant: Restaurant): RestaurantInfo? {
// 값을 가져오기 전에 fetchAndActivate 호출
fetchAndActivateSafely()
return getCafeteriaInfo().find { it.enum == restaurant }
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getMinimumVersionCode()/getAppTheme()/getRestaurantInfo()가 모두 fetchAndActivateSafely()를 호출하고 있어, 앱 시작 시 여러 값을 연속으로 읽는 경우 fetchAndActivate()가 중복 호출됩니다. Remote Config가 내부적으로 캐시를 쓰더라도 불필요한 작업/지연이 발생할 수 있으니, fetch를 1회만 수행하도록 (예: fetch 작업을 memoize하거나, 외부에서 한 번 fetch 후 여러 getter가 값을 읽도록) 구조를 조정하는 게 좋습니다.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Collaborator

@chlwhdtn03 chlwhdtn03 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

앱 테마랑 아이콘을 Firebase에서 한번에 제어하는거네요

와 너무 깔끔한데요 테스트코드까지

@PeraSite PeraSite merged commit 4a391f6 into develop Apr 9, 2026
2 checks passed
@PeraSite PeraSite deleted the feat/app-theme branch April 9, 2026 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants