Skip to content

Conversation

@DongChyeon
Copy link
Member

Related issue 🛠

closed #162

어떤 변경사항이 있었나요?

  • 🐞 BugFix Something isn't working
  • 🎨 Design Markup & styling
  • 📃 Docs Documentation writing and editing (README.md, etc.)
  • ✨ Feature Feature
  • 🔨 Refactor Code refactoring
  • ⚙️ Setting Development environment setup
  • ✅ Test Test related (Junit, etc.)

CheckPoint ✅

PR이 다음 요구 사항을 충족하는지 확인하세요.

  • PR 컨벤션에 맞게 작성했습니다. (필수)
  • merge할 브랜치의 위치를 확인해 주세요(main❌/develop⭕) (필수)
  • Approve된 PR은 assigner가 머지하고, 수정 요청이 온 경우 수정 후 다시 push를 합니다. (필수)
  • BugFix의 경우, 버그의 원인을 파악하였습니다. (선택)

Work Description ✏️

default.mp4
val hasNewFortuneFlow: Flow<Boolean> = dataStore.data
    .catch { emit(emptyPreferences()) }
    .map { preferences ->
        val savedDate = preferences[Keys.FORTUNE_DATE]
        val isChecked = preferences[Keys.FORTUNE_CHECKED] ?: true
        val todayDate = LocalDate.now().format(DateTimeFormatter.ISO_DATE)
        savedDate == todayDate && !isChecked
    }
    .distinctUntilChanged()

suspend fun saveFortuneId(fortuneId: Long) {
    val currentDate = LocalDate.now().format(DateTimeFormatter.ISO_DATE)
    dataStore.edit { preferences ->
        preferences[Keys.FORTUNE_ID] = fortuneId
        preferences[Keys.FORTUNE_DATE] = currentDate
        preferences[Keys.FORTUNE_CHECKED] = false
    }
}

운세 생성 (saveFortuenId) 시에 FORTUNE_CHECKED 값을 false로 설정
hasNewFortuneFlowFORTUNE_CHECKED 값이 true이고 저장날짜가 오늘과 동일할 때만 true
홈 화면에서 메일 버튼을 클릭해서 운세로 갈 때 FORTUNE_CHECKED 를 false로 설정

Uncompleted Tasks 😅

N/A

To Reviewers 📢

image

@DongChyeon DongChyeon force-pushed the feat/#162-home-tooltip-unchecked-fortune branch from 2abf47f to bbfb26c Compare February 20, 2025 08:38
Copy link
Member

@MoonsuKang MoonsuKang left a comment

Choose a reason for hiding this comment

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

수고하셨습니다

Copy link
Member

Choose a reason for hiding this comment

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

굳굳

@DongChyeon DongChyeon merged commit 55070bd into develop Feb 20, 2025
1 check passed
@DongChyeon DongChyeon deleted the feat/#162-home-tooltip-unchecked-fortune branch June 10, 2025 08:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT] 홈 화면에서 확인하지 않은 운세가 있을 시 툴팁 띄우기

3 participants