Skip to content

Create Week4 Mission 1, 2, senior#22

Open
0Whitebird0 wants to merge 3 commits intomainfrom
Week04/OneStone
Open

Create Week4 Mission 1, 2, senior#22
0Whitebird0 wants to merge 3 commits intomainfrom
Week04/OneStone

Conversation

@0Whitebird0
Copy link
Copy Markdown
Contributor

📝 미션 번호

4주차 Misson 1, 2, senior

📋 구현 사항

  • datastoremanager.kt파일로 데이터를 데이터스토어에 저장하며 데이터 관리하는 코드를 몰아놓음
  • 구매하기 탭에서 아이템에 하트 눌렀을 때 데이터스토어에 반영하고 위시리스트 화면에서는 하트 누른 아이템들만 필터링하여 어댑터에 집어넣음
  • 홈화면의 리사이클러뷰에다가 1.5초동안 delay로 로딩상태를 만들어 로딩 애니메이션을 집어넣음

📎 스크린샷

Screen_recording_20260331_191608.webm

✅ 체크리스트

  • [v] Merge 하려는 브랜치가 올바르게 설정되어 있나요?
  • [v] 에뮬레이터 또는 실제 기기에서 정상 동작하나요?
  • [v] 불필요한 주석 및 Log가 제거되었나요? - 리사이클러뷰 동작 이해를 위한 로그는 남겨둠

🤔 질문 사항

Copy link
Copy Markdown

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

Week02~Week04의 OneStone Android 프로젝트를 추가하고(Week04 중심), DataStore 기반으로 구매하기/위시리스트 상태(하트)를 영속화하며 홈 화면에 로딩 상태(1.5초 딜레이 + 로딩 아이템)를 도입하는 변경입니다.

Changes:

  • (Week04) DataStore + Gson으로 상품/구매상품 목록 및 위시리스트 상태 저장/조회 로직 추가
  • (Week04) 구매하기 탭에서 하트 토글 시 DataStore에 반영, 위시리스트 화면에서 wishlisted 항목만 필터링
  • (Week04) 홈 RecyclerView에 로딩 아이템(ProgressIndicator) 표시 후 실제 데이터 바인딩

Reviewed changes

Copilot reviewed 201 out of 268 changed files in this pull request and generated 15 comments.

Show a summary per file
File Description
.gitignore IDE 설정 디렉터리 무시 설정 추가
Week04/OneStone/settings.gradle.kts Gradle 설정/리포지토리 설정
Week04/OneStone/build.gradle.kts 루트 Gradle 플러그인 alias 설정
Week04/OneStone/gradle.properties Gradle 공통 설정
Week04/OneStone/gradle/gradle-daemon-jvm.properties Gradle 데몬 JVM/툴체인 설정
Week04/OneStone/gradle/libs.versions.toml 버전 카탈로그 정의
Week04/OneStone/gradle/wrapper/gradle-wrapper.properties Gradle Wrapper 설정
Week04/OneStone/gradle/wrapper/gradle-wrapper.jar Gradle Wrapper 바이너리
Week04/OneStone/gradlew Gradle 실행 스크립트(Unix)
Week04/OneStone/gradlew.bat Gradle 실행 스크립트(Windows)
Week04/OneStone/app/.gitignore app 모듈 빌드 산출물 무시
Week04/OneStone/app/build.gradle.kts app 모듈 빌드 설정/의존성
Week04/OneStone/app/proguard-rules.pro Proguard 규칙 템플릿
Week04/OneStone/app/src/main/AndroidManifest.xml 앱/액티비티 등록
Week04/OneStone/app/src/main/java/com/example/umc10th/CartFragment.kt 장바구니 화면/네비게이션
Week04/OneStone/app/src/main/java/com/example/umc10th/DataStoreManager.kt DataStore 기반 데이터 영속화/초기화
Week04/OneStone/app/src/main/java/com/example/umc10th/HomeFragment.kt 홈 화면 + 로딩 딜레이/리스트
Week04/OneStone/app/src/main/java/com/example/umc10th/MainActivity.kt BottomNavigation + NavController 구성
Week04/OneStone/app/src/main/java/com/example/umc10th/Product.kt 홈 상품 모델
Week04/OneStone/app/src/main/java/com/example/umc10th/ProductAdapter.kt 홈 상품/로딩 아이템 어댑터
Week04/OneStone/app/src/main/java/com/example/umc10th/ProductDetailFragment.kt 상품 상세 화면
Week04/OneStone/app/src/main/java/com/example/umc10th/ProfileFragment.kt 프로필 화면
Week04/OneStone/app/src/main/java/com/example/umc10th/PurchaseAllFragment.kt 구매하기(전체) + DataStore 연동
Week04/OneStone/app/src/main/java/com/example/umc10th/PurchaseFragment.kt 구매하기 탭/상세 자동 오픈 로직
Week04/OneStone/app/src/main/java/com/example/umc10th/PurchasePagerAdapter.kt 구매하기 ViewPager 어댑터
Week04/OneStone/app/src/main/java/com/example/umc10th/PurchaseProduct.kt 구매 상품 모델
Week04/OneStone/app/src/main/java/com/example/umc10th/PurchaseProductAdapter.kt 구매 상품 어댑터(하트 토글)
Week04/OneStone/app/src/main/java/com/example/umc10th/PurchaseSalesFragment.kt 구매하기(Sales) 탭 화면
Week04/OneStone/app/src/main/java/com/example/umc10th/PurchaseTopsFragment.kt 구매하기(Tops) 탭 화면
Week04/OneStone/app/src/main/java/com/example/umc10th/SplashActivity.kt 스플래시 화면/메인 진입
Week04/OneStone/app/src/main/java/com/example/umc10th/WishlistFragment.kt 위시리스트 필터링/하트 반영
Week04/OneStone/app/src/main/java/com/example/umc10th/WishlistProductAdapter.kt 위시리스트용 어댑터(현재 미사용)
Week04/OneStone/app/src/main/res/color/bottom_nav_item.xml BottomNav 선택 상태 색상
Week04/OneStone/app/src/main/res/drawable/caretdown.xml 아이콘 리소스
Week04/OneStone/app/src/main/res/drawable/heartstraight.xml 아이콘 리소스
Week04/OneStone/app/src/main/res/drawable/home_logo.png 이미지 리소스
Week04/OneStone/app/src/main/res/drawable/ic_bag_circle.xml 아이콘 리소스
Week04/OneStone/app/src/main/res/drawable/ic_bag_simple.xml 아이콘 리소스
Week04/OneStone/app/src/main/res/drawable/ic_heart_straight.xml 아이콘 리소스
Week04/OneStone/app/src/main/res/drawable/ic_house_simple.xml 아이콘 리소스
Week04/OneStone/app/src/main/res/drawable/ic_launcher_background.xml 런처 리소스
Week04/OneStone/app/src/main/res/drawable/ic_launcher_foreground.xml 런처 리소스
Week04/OneStone/app/src/main/res/drawable/ic_list_magnifying_glass.xml 아이콘 리소스
Week04/OneStone/app/src/main/res/drawable/ic_user.xml 아이콘 리소스
Week04/OneStone/app/src/main/res/drawable/icon_back.xml 아이콘 리소스
Week04/OneStone/app/src/main/res/drawable/img_blank_heart.png 하트 이미지 리소스
Week04/OneStone/app/src/main/res/drawable/img_filled_heart.png 하트 이미지 리소스
Week04/OneStone/app/src/main/res/drawable/magnifyingglass.xml 아이콘 리소스
Week04/OneStone/app/src/main/res/drawable/shoes1.png 이미지 리소스
Week04/OneStone/app/src/main/res/drawable/shoes2.png 이미지 리소스
Week04/OneStone/app/src/main/res/drawable/socks1.png 이미지 리소스
Week04/OneStone/app/src/main/res/drawable/socks2.png 이미지 리소스
Week04/OneStone/app/src/main/res/layout/activity_main.xml 메인 UI 레이아웃
Week04/OneStone/app/src/main/res/layout/activity_splash.xml 스플래시 UI 레이아웃
Week04/OneStone/app/src/main/res/layout/fragment_cart.xml 장바구니 UI 레이아웃
Week04/OneStone/app/src/main/res/layout/fragment_home.xml 홈 UI 레이아웃
Week04/OneStone/app/src/main/res/layout/fragment_product_detail.xml 상품상세 UI 레이아웃
Week04/OneStone/app/src/main/res/layout/fragment_profile.xml 프로필 UI 레이아웃
Week04/OneStone/app/src/main/res/layout/fragment_purchase_all.xml 구매하기(전체) UI 레이아웃
Week04/OneStone/app/src/main/res/layout/fragment_purchase_sales.xml 구매하기(Sales) UI 레이아웃
Week04/OneStone/app/src/main/res/layout/fragment_purchase_tops.xml 구매하기(Tops) UI 레이아웃
Week04/OneStone/app/src/main/res/layout/fragment_purchase.xml 구매하기 컨테이너 UI
Week04/OneStone/app/src/main/res/layout/fragment_wishlist.xml 위시리스트 UI 레이아웃
Week04/OneStone/app/src/main/res/layout/item_loading_product.xml 로딩 아이템 UI
Week04/OneStone/app/src/main/res/layout/item_product.xml 홈 상품 아이템 UI
Week04/OneStone/app/src/main/res/layout/item_purchase_product.xml 구매 상품 아이템 UI
Week04/OneStone/app/src/main/res/layout/item_wishlist_product.xml 위시리스트 아이템 UI
Week04/OneStone/app/src/main/res/menu/menu_bottom_nav.xml BottomNav 메뉴
Week04/OneStone/app/src/main/res/mipmap-anydpi/ic_launcher.xml 런처 리소스
Week04/OneStone/app/src/main/res/mipmap-anydpi/ic_launcher_round.xml 런처 리소스
Week04/OneStone/app/src/main/res/mipmap-hdpi/ic_launcher.webp 런처 아이콘
Week04/OneStone/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp 런처 아이콘
Week04/OneStone/app/src/main/res/mipmap-mdpi/ic_launcher.webp 런처 아이콘
Week04/OneStone/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp 런처 아이콘
Week04/OneStone/app/src/main/res/mipmap-xhdpi/ic_launcher.webp 런처 아이콘
Week04/OneStone/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp 런처 아이콘
Week04/OneStone/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp 런처 아이콘
Week04/OneStone/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp 런처 아이콘
Week04/OneStone/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp 런처 아이콘
Week04/OneStone/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp 런처 아이콘
Week04/OneStone/app/src/main/res/navigation/nav_graph.xml Navigation 그래프
Week04/OneStone/app/src/main/res/values/colors.xml 색상 리소스
Week04/OneStone/app/src/main/res/values/strings.xml 문자열 리소스
Week04/OneStone/app/src/main/res/values/themes.xml 테마 리소스
Week04/OneStone/app/src/main/res/values-night/themes.xml 다크 테마 리소스
Week04/OneStone/app/src/main/res/xml/backup_rules.xml 백업 규칙
Week04/OneStone/app/src/main/res/xml/data_extraction_rules.xml 데이터 추출 규칙
Week04/OneStone/app/src/test/java/com/example/umc10th/ExampleUnitTest.kt 유닛 테스트 템플릿
Week04/OneStone/app/src/androidTest/java/com/example/umc10th/ExampleInstrumentedTest.kt 계측 테스트 템플릿
Week03/OneStone/.gitignore 프로젝트 무시 규칙
Week03/OneStone/settings.gradle.kts Gradle 설정/리포지토리 설정
Week03/OneStone/build.gradle.kts 루트 Gradle 플러그인 alias 설정
Week03/OneStone/gradle.properties Gradle 공통 설정
Week03/OneStone/gradle/gradle-daemon-jvm.properties Gradle 데몬 JVM/툴체인 설정
Week03/OneStone/gradle/libs.versions.toml 버전 카탈로그 정의
Week03/OneStone/gradle/wrapper/gradle-wrapper.properties Gradle Wrapper 설정
Week03/OneStone/gradle/wrapper/gradle-wrapper.jar Gradle Wrapper 바이너리
Week03/OneStone/gradlew Gradle 실행 스크립트(Unix)
Week03/OneStone/gradlew.bat Gradle 실행 스크립트(Windows)
Week03/OneStone/app/.gitignore app 모듈 빌드 산출물 무시
Week03/OneStone/app/build.gradle.kts app 모듈 빌드 설정
Week03/OneStone/app/proguard-rules.pro Proguard 규칙 템플릿
Week03/OneStone/app/src/main/AndroidManifest.xml 앱/액티비티 등록
Week03/OneStone/app/src/main/java/com/example/umc10th/CartFragment.kt 장바구니 화면/네비게이션
Week03/OneStone/app/src/main/java/com/example/umc10th/HomeFragment.kt 홈 화면 로직
Week03/OneStone/app/src/main/java/com/example/umc10th/MainActivity.kt BottomNavigation + NavController 구성
Week03/OneStone/app/src/main/java/com/example/umc10th/Product.kt 홈 상품 모델
Week03/OneStone/app/src/main/java/com/example/umc10th/ProductAdapter.kt 홈 상품 어댑터
Week03/OneStone/app/src/main/java/com/example/umc10th/ProductDetailFragment.kt 상품 상세 화면
Week03/OneStone/app/src/main/java/com/example/umc10th/ProfileFragment.kt 프로필 화면
Week03/OneStone/app/src/main/java/com/example/umc10th/PurchaseAllFragment.kt 구매하기(전체) 화면
Week03/OneStone/app/src/main/java/com/example/umc10th/PurchaseFragment.kt 구매하기 탭/상세 오픈 로직
Week03/OneStone/app/src/main/java/com/example/umc10th/PurchasePagerAdapter.kt 구매하기 ViewPager 어댑터
Week03/OneStone/app/src/main/java/com/example/umc10th/PurchaseProduct.kt 구매 상품 모델
Week03/OneStone/app/src/main/java/com/example/umc10th/PurchaseProductAdapter.kt 구매 상품 어댑터
Week03/OneStone/app/src/main/java/com/example/umc10th/PurchaseShoesFragment.kt 구매하기(Shoes) 탭
Week03/OneStone/app/src/main/java/com/example/umc10th/PurchaseTopsFragment.kt 구매하기(Tops) 탭
Week03/OneStone/app/src/main/java/com/example/umc10th/SplashActivity.kt 스플래시 화면
Week03/OneStone/app/src/main/java/com/example/umc10th/WishlistFragment.kt 위시리스트 화면 로직
Week03/OneStone/app/src/main/java/com/example/umc10th/WishlistProduct.kt 위시리스트 모델
Week03/OneStone/app/src/main/java/com/example/umc10th/WishlistProductAdapter.kt 위시리스트 어댑터
Week03/OneStone/app/src/main/res/color/bottom_nav_item.xml BottomNav 선택 상태 색상
Week03/OneStone/app/src/main/res/drawable/* 아이콘/이미지 리소스(Week03)
Week03/OneStone/app/src/main/res/layout/* 화면/아이템 레이아웃(Week03)
Week03/OneStone/app/src/main/res/menu/menu_bottom_nav.xml BottomNav 메뉴
Week03/OneStone/app/src/main/res/mipmap-anydpi/ic_launcher.xml 런처 리소스
Week03/OneStone/app/src/main/res/mipmap-anydpi/ic_launcher_round.xml 런처 리소스
Week03/OneStone/app/src/main/res/mipmap-hdpi/ic_launcher.webp 런처 아이콘
Week03/OneStone/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp 런처 아이콘
Week03/OneStone/app/src/main/res/mipmap-mdpi/ic_launcher.webp 런처 아이콘
Week03/OneStone/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp 런처 아이콘
Week03/OneStone/app/src/main/res/mipmap-xhdpi/ic_launcher.webp 런처 아이콘
Week03/OneStone/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp 런처 아이콘
Week03/OneStone/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp 런처 아이콘
Week03/OneStone/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp 런처 아이콘
Week03/OneStone/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp 런처 아이콘
Week03/OneStone/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp 런처 아이콘
Week03/OneStone/app/src/main/res/navigation/nav_graph.xml Navigation 그래프(Week03)
Week03/OneStone/app/src/main/res/values/colors.xml 색상 리소스
Week03/OneStone/app/src/main/res/values/strings.xml 문자열 리소스
Week03/OneStone/app/src/main/res/values/themes.xml 테마 리소스
Week03/OneStone/app/src/main/res/values-night/themes.xml 다크 테마 리소스
Week03/OneStone/app/src/main/res/xml/backup_rules.xml 백업 규칙
Week03/OneStone/app/src/main/res/xml/data_extraction_rules.xml 데이터 추출 규칙
Week03/OneStone/app/src/test/java/com/example/umc10th/ExampleUnitTest.kt 유닛 테스트 템플릿
Week03/OneStone/app/src/androidTest/java/com/example/umc10th/ExampleInstrumentedTest.kt 계측 테스트 템플릿
Week03/OneStone/.idea/.gitignore IDE 설정(커밋 비권장)
Week03/OneStone/.idea/.name IDE 설정(커밋 비권장)
Week03/OneStone/.idea/AndroidProjectSystem.xml IDE 설정(커밋 비권장)
Week03/OneStone/.idea/compiler.xml IDE 설정(커밋 비권장)
Week03/OneStone/.idea/deploymentTargetSelector.xml IDE 설정(커밋 비권장)
Week03/OneStone/.idea/deviceManager.xml IDE 설정(커밋 비권장)
Week03/OneStone/.idea/gradle.xml IDE 설정(커밋 비권장)
Week03/OneStone/.idea/misc.xml IDE 설정(커밋 비권장)
Week03/OneStone/.idea/runConfigurations.xml IDE 설정(커밋 비권장)
Week02/OneStone/.gitignore 프로젝트 무시 규칙
Week02/OneStone/settings.gradle.kts Gradle 설정/리포지토리 설정
Week02/OneStone/build.gradle.kts 루트 Gradle 플러그인 alias 설정
Week02/OneStone/gradle.properties Gradle 공통 설정
Week02/OneStone/gradle/gradle-daemon-jvm.properties Gradle 데몬 JVM/툴체인 설정
Week02/OneStone/gradle/libs.versions.toml 버전 카탈로그 정의
Week02/OneStone/gradle/wrapper/gradle-wrapper.properties Gradle Wrapper 설정
Week02/OneStone/gradle/wrapper/gradle-wrapper.jar Gradle Wrapper 바이너리
Week02/OneStone/gradlew Gradle 실행 스크립트(Unix)
Week02/OneStone/gradlew.bat Gradle 실행 스크립트(Windows)
Week02/OneStone/app/.gitignore app 모듈 빌드 산출물 무시
Week02/OneStone/app/build.gradle.kts app 모듈 빌드 설정
Week02/OneStone/app/proguard-rules.pro Proguard 규칙 템플릿
Week02/OneStone/app/src/main/AndroidManifest.xml 앱/액티비티 등록
Week02/OneStone/app/src/main/java/com/example/umc10th/* 프래그먼트/액티비티 코드(Week02)
Week02/OneStone/app/src/main/res/color/bottom_nav_item.xml BottomNav 선택 상태 색상
Week02/OneStone/app/src/main/res/drawable/* 아이콘/이미지 리소스(Week02)
Week02/OneStone/app/src/main/res/layout/* 화면 레이아웃(Week02)
Week02/OneStone/app/src/main/res/menu/menu_bottom_nav.xml BottomNav 메뉴
Week02/OneStone/app/src/main/res/mipmap-anydpi/ic_launcher.xml 런처 리소스
Week02/OneStone/app/src/main/res/mipmap-anydpi/ic_launcher_round.xml 런처 리소스
Week02/OneStone/app/src/main/res/mipmap-hdpi/ic_launcher.webp 런처 아이콘
Week02/OneStone/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp 런처 아이콘
Week02/OneStone/app/src/main/res/mipmap-mdpi/ic_launcher.webp 런처 아이콘
Week02/OneStone/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp 런처 아이콘
Week02/OneStone/app/src/main/res/mipmap-xhdpi/ic_launcher.webp 런처 아이콘
Week02/OneStone/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp 런처 아이콘
Week02/OneStone/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp 런처 아이콘
Week02/OneStone/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp 런처 아이콘
Week02/OneStone/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp 런처 아이콘
Week02/OneStone/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp 런처 아이콘
Week02/OneStone/app/src/main/res/navigation/nav_graph.xml Navigation 그래프(Week02)
Week02/OneStone/app/src/main/res/values/colors.xml 색상 리소스
Week02/OneStone/app/src/main/res/values/strings.xml 문자열 리소스
Week02/OneStone/app/src/main/res/values/themes.xml 테마 리소스
Week02/OneStone/app/src/main/res/values-night/themes.xml 다크 테마 리소스
Week02/OneStone/app/src/main/res/xml/backup_rules.xml 백업 규칙
Week02/OneStone/app/src/main/res/xml/data_extraction_rules.xml 데이터 추출 규칙
Week02/OneStone/app/src/test/java/com/example/umc10th/ExampleUnitTest.kt 유닛 테스트 템플릿
Week02/OneStone/app/src/androidTest/java/com/example/umc10th/ExampleInstrumentedTest.kt 계측 테스트 템플릿
Week02/OneStone/.idea/* IDE 설정 파일들(커밋 비권장)
Files not reviewed (18)
  • Week02/OneStone/.idea/.gitignore: Language not supported
  • Week02/OneStone/.idea/.name: Language not supported
  • Week02/OneStone/.idea/AndroidProjectSystem.xml: Language not supported
  • Week02/OneStone/.idea/compiler.xml: Language not supported
  • Week02/OneStone/.idea/deploymentTargetSelector.xml: Language not supported
  • Week02/OneStone/.idea/deviceManager.xml: Language not supported
  • Week02/OneStone/.idea/gradle.xml: Language not supported
  • Week02/OneStone/.idea/misc.xml: Language not supported
  • Week02/OneStone/.idea/runConfigurations.xml: Language not supported
  • Week03/OneStone/.idea/.gitignore: Language not supported
  • Week03/OneStone/.idea/.name: Language not supported
  • Week03/OneStone/.idea/AndroidProjectSystem.xml: Language not supported
  • Week03/OneStone/.idea/compiler.xml: Language not supported
  • Week03/OneStone/.idea/deploymentTargetSelector.xml: Language not supported
  • Week03/OneStone/.idea/deviceManager.xml: Language not supported
  • Week03/OneStone/.idea/gradle.xml: Language not supported
  • Week03/OneStone/.idea/misc.xml: Language not supported
  • Week03/OneStone/.idea/runConfigurations.xml: Language not supported

Comment on lines +1 to +6
plugins {
alias(libs.plugins.android.application)
}

apply(plugin = "androidx.navigation.safeargs.kotlin")

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.

app 모듈에 Kotlin Android 플러그인이 적용되어 있지 않아(plugins 블록에 org.jetbrains.kotlin.android/kotlin("android") 없음) 현재 Kotlin 소스가 컴파일되지 않습니다. alias(libs.plugins.jetbrains.kotlin.android)를 함께 적용하도록 수정해 주세요.

Copilot uses AI. Check for mistakes.
Comment on lines +1 to +6
plugins {
alias(libs.plugins.android.application)
}

apply(plugin = "androidx.navigation.safeargs.kotlin")

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.

app 모듈에 Kotlin Android 플러그인이 적용되어 있지 않아 Kotlin 소스가 컴파일되지 않습니다. alias(libs.plugins.jetbrains.kotlin.android)(또는 동등한 kotlin-android 플러그인)을 plugins 블록에 추가해 주세요.

Copilot uses AI. Check for mistakes.
Comment on lines +1 to +6
plugins {
alias(libs.plugins.android.application)
}

apply(plugin = "androidx.navigation.safeargs.kotlin")

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.

app 모듈에 Kotlin Android 플러그인이 적용되어 있지 않아 Kotlin 소스가 컴파일되지 않습니다. alias(libs.plugins.jetbrains.kotlin.android)(또는 동등한 kotlin-android 플러그인)을 plugins 블록에 추가해 주세요.

Copilot uses AI. Check for mistakes.
Comment on lines +19 to +26
val PRODUCTS_KEY = stringPreferencesKey("products_key")

val PURCHASE_PRODUCTS_KEY = stringPreferencesKey("purchase_products_key")
private val gson = Gson()

suspend fun saveProducts(context: Context, Products: List<Product>) {

val jsonString = gson.toJson(Products)
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.

PRODUCTS_KEY/PURCHASE_PRODUCTS_KEYgson이 파일 최상위에서 public으로 노출되고 있고, 매개변수명도 Products처럼 대문자로 시작합니다. 외부 노출이 필요 없다면 private로 제한하고, Kotlin 컨벤션에 맞게 products 등 lowerCamelCase로 이름을 정리해 주세요.

Copilot uses AI. Check for mistakes.
Comment on lines +38 to +41
getPurchaseProducts(requireContext()).collect{ purchaseProducts ->
val new_wishListProducts = purchaseProducts.filter{ it.isWishlisted}
wishListAdapter.submitList(new_wishListProducts)
}
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.

new_wishListProducts는 snake_case라 Kotlin 네이밍 컨벤션과 다릅니다. newWishListProducts처럼 lowerCamelCase로 변경해 가독성과 일관성을 맞춰 주세요.

Copilot uses AI. Check for mistakes.
Comment on lines +22 to +30
val message = binding.splashText.text.toString()
Handler(Looper.getMainLooper()).postDelayed({
val intent = Intent(this, MainActivity::class.java).apply {
putExtra(MainActivity.EXTRA_HOME_TITLE, message)
}
startActivity(intent)
finish()
}, 3000L)
}
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.

Handler().postDelayed로 지연 실행을 걸어두면 액티비티가 중간에 종료/재생성될 때 콜백이 남아 메모리 릭/의도치 않은 네비게이션이 발생할 수 있습니다. Handler를 멤버로 두고 onDestroy()에서 removeCallbacksAndMessages(null) 처리하거나, lifecycleScope + delay로 대체해 주세요.

Copilot uses AI. Check for mistakes.
Comment on lines +22 to +30
val message = binding.splashText.text.toString()
Handler(Looper.getMainLooper()).postDelayed({
val intent = Intent(this, MainActivity::class.java).apply {
putExtra(MainActivity.EXTRA_HOME_TITLE, message)
}
startActivity(intent)
finish()
}, 3000L)
}
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.

Handler().postDelayed 콜백이 액티비티 생명주기와 분리되어 있어 종료/재생성 시 메모리 릭/의도치 않은 실행 위험이 있습니다. onDestroy()에서 콜백 제거 또는 lifecycleScope 기반으로 변경해 주세요.

Copilot uses AI. Check for mistakes.
Comment on lines +22 to +30
val message = binding.splashText.text.toString()
Handler(Looper.getMainLooper()).postDelayed({
val intent = Intent(this, MainActivity::class.java).apply {
putExtra(MainActivity.EXTRA_HOME_TITLE, message)
}
startActivity(intent)
finish()
}, 3000L)
}
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.

Handler().postDelayed 콜백이 액티비티 생명주기와 분리되어 있어 종료/재생성 시 메모리 릭/의도치 않은 실행 위험이 있습니다. onDestroy()에서 콜백 제거 또는 lifecycleScope 기반으로 변경해 주세요.

Copilot uses AI. Check for mistakes.
Comment on lines +1 to +9
<project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="ProjectRootManager" version="2" languageLevel="JDK_21" default="true" project-jdk-name="jbr-21" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">
<option name="id" value="Android" />
</component>
</project> No newline at end of file
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.

.idea 설정 파일은 개인 IDE 환경에 종속적이라 저장소에 커밋하지 않는 것이 일반적입니다. .idea/ 디렉터리는 git에서 제거하고(이미 트래킹 중이면 삭제 커밋), .gitignore로만 관리해 주세요.

Copilot uses AI. Check for mistakes.
Comment on lines +1 to +9
<project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="ProjectRootManager" version="2" languageLevel="JDK_21" default="true" project-jdk-name="jbr-21" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
<component name="ProjectType">
<option name="id" value="Android" />
</component>
</project> No newline at end of file
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.

.idea 설정 파일은 개인 IDE 환경에 종속적이라 저장소에 커밋하지 않는 것이 일반적입니다. .idea/ 디렉터리는 git에서 제거하고(이미 트래킹 중이면 삭제 커밋), .gitignore로만 관리해 주세요.

Copilot uses AI. Check for mistakes.
@Dawon-Y
Copy link
Copy Markdown
Contributor

Dawon-Y commented Apr 12, 2026

안녕하세요! 4주차 과제 수행하시느라 고생 많으셨습니다💚
작성해주신 코드에 대한 리뷰를 정리했으니 참고하시면 좋을 것 같습니다.


총평

HomeFragment.observeProducts()에서 로딩 상태를 먼저 보여주고(showLoading), delay(1500)로 의도적으로 딜레이를 준 다음, DataStore 초기화 및 Flow.collect로 데이터를 받아 submitList로 교체하는 흐름이 잘 구성되어 있습니다.
즉, “데이터를 가져오거나 저장할 때 로딩 화면을 보여주기”라는 시니어 미션 요구사항을 RecyclerView 로딩 뷰 타입(ViewType Loading) 방식으로 자연스럽게 달성하고 있습니다.

1. 로딩 처리 진입 타이밍(HomeFragment)

viewLifecycleOwner.lifecycleScope.launch {
    showLoading()

    delay(1500)
    initializeProducts(requireContext())
    getProducts(requireContext()).collect { products ->
        productAdapter.submitList(products)
    }
}

로딩 UI를 collect 이전에 먼저 노출하고, 이후에 데이터 초기화/수집을 시작하는 흐름이 좋습니다.
“일부러 딜레이를 주어 로딩 화면을 오래 보여주는 것”도 과제 가이드에 맞게 반영하셨습니다.

(선택 개선)
collect는 계속 스트림을 받기 때문에, 최초 1회 로딩만 보여주는 목적이라면 first()로 최초 값만 받고 로딩을 내리는 방식도 고려할 수 있습니다.
(하지만 현재처럼 DataStore 변경을 실시간 반영하고 싶다면 collect가 맞습니다.)

2. 로딩 UI 구현 방식(ProductAdapter의 ViewType)

ProductAdapter에서 “로딩 상태”를 별도 ViewType으로 처리한 점이 이번 시니어 미션에서 가장 좋은 포인트입니다.

2-1) ViewType 분기

override fun getItemViewType(position: Int): Int {
    return if (isLoading) VIEW_TYPE_LOADING else VIEW_TYPE_PRODUCT
}

2-2) 로딩 ViewHolder 생성

VIEW_TYPE_LOADING -> ItemLoadingProductBinding ... LoadingViewHolder

2-3) 로딩 상태 제어 API

fun showLoading() {
    isLoading = true
    notifyDataSetChanged()
}

fun submitList(newItems: List<Product>) {
    isLoading = false
    items = newItems
    notifyDataSetChanged()
}

showLoading() / submitList()로 외부(HomeFragment)에서 상태를 명확히 제어할 수 있게 만든 점이 좋습니다.
DEFAULT_LOADING_ITEM_COUNT = 3로 로딩 아이템 개수를 고정한 것도, UI 일관성이 생겨서 괜찮은 선택입니다.

3. 클릭 처리 안전장치(ProductAdapter)

if (position != RecyclerView.NO_POSITION && !isLoading) {
    onItemClick(items[position])
}

로딩 중에는 클릭이 발생하지 않도록 막아둔 점이 UX/안정성 측면에서 좋습니다.
onViewAttachedToWindow/onViewDetachedFromWindow에서 클릭 리스너를 관리해 불필요한 참조가 남지 않게 처리한 것도 깔끔합니다.

(선택 개선)
일반적으로는 onBindViewHolder에서 클릭 리스너를 붙이는 패턴이 더 흔하긴 하지만, 지금 구조도 문제는 없습니다.
다만 ViewHolder 재사용/리스너 관리 흐름이 복잡해질 수 있으니 팀 컨벤션에 맞춰 통일하면 좋습니다.

4. DataStore 초기화/읽기(DataStoreManager)

4-1) 최초 1회 초기화(initializeProducts)

val currentProducts = getProducts(context).first()
if(currentProducts.isNotEmpty()) return
saveProducts(context, defaultProducts)

first()로 현재 저장값이 비었는지 확인하고, 비어있을 때만 기본값을 저장하는 seed 패턴이 깔끔합니다.

4-2) Flow 기반 조회(getProducts)

fun getProducts(context: Context): Flow<List<Product>> = context.dataStore.data.map { ... }

Home에서 collect로 받아오는 구조와 잘 맞습니다.

(선택 개선)
DataStoreManager.kt는 top-level 함수/전역 key로 구성되어 있는데, 규모가 커지면 object DataStoreManager 형태로 묶거나 Repository 계층으로 분리하면 테스트/확장에 유리합니다. (과제 범위에서는 현재도 충분합니다.)

5. CartFragment / ProfileFragment

CartFragment는 버튼 클릭 시 Purchase로 이동만 담당하고 있어 책임이 단순합니다.
ProfileFragment도 뷰 바인딩만 처리하는 형태라 현재 요구사항과 충돌이 없습니다.

6. (중요) “Loading Dialog” 요구사항과의 정합성 코멘트

과제 문구는 “Loading Dialog를 보여주기”라고 되어 있지만, 현재 구현은 Dialog 대신 RecyclerView 내부 로딩 셀(스켈레톤/플레이스홀더) 형태입니다.

UX 관점에서는 충분히 “로딩 UI”로 인정될 수 있는 구현이고,
실제로 데이터를 가져오기 전에 로딩을 노출하고 딜레이까지 주었기 때문에 시니어 미션 의도에는 부합합니다.

다만 제출 기준이 정말 “Dialog 형태”를 요구한다면,
DialogFragment 또는 ProgressBar 오버레이(전체 화면)를 추가해서
showLoading() 때 show / submitList() 때 dismiss 형태로 확장하면 완벽하게 문구와도 일치합니다.


마무리

이번 구현은

  • 로딩 UI를 명확히 분리(ViewType Loading)
  • 데이터 수집 전에 로딩을 먼저 보여주고(딜레이 포함)
  • 데이터 수신 시 로딩 종료 후 실제 리스트 렌더링 이라는 흐름이 깔끔해서, 시니어 미션(로딩 처리) 관점에서 완성도가 높습니다.

코드 리뷰 확인해보시고 궁금한 점 있으면 언제든지 말씀해주세요!

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