-
Notifications
You must be signed in to change notification settings - Fork 1
[BUGFIX] 오늘의 운세 생성에 실패할 시 다음날이 되기 전까지 계속 운세 생성에 실패하는 문제 #279
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
7c87876
[FEAT/#278] 운세 생성 중 상태를 추적하는 InMemoryFortuneCreationTracker 구현
DongChyeon 8a85fca
[REFACTOR/#278] 운세 생성 상태(FortuneCreateStatus) 관리 로직 제거 및 hasTodayFort…
DongChyeon 360666f
[REFACTOR/#278] 운세 생성 상태 관리를 FortuneCreationTracker로 이관
DongChyeon 641ca98
[FEAT/#278] 알람 해제 시 PostFortuneTaskScheduler 대신 FortuneRepository를 사용…
DongChyeon f58ce2e
[REFACTOR/#278] WorkManager 제거
DongChyeon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,24 +1,13 @@ | ||
| package com.yapp.orbit | ||
|
|
||
| import android.app.Application | ||
| import androidx.hilt.work.HiltWorkerFactory | ||
| import androidx.work.Configuration | ||
| import com.google.android.gms.ads.MobileAds | ||
| import dagger.hilt.android.HiltAndroidApp | ||
| import javax.inject.Inject | ||
|
|
||
| @HiltAndroidApp | ||
| class OrbitApplication() : Application(), Configuration.Provider { | ||
|
|
||
| @Inject lateinit var workerFactory: HiltWorkerFactory | ||
|
|
||
| class OrbitApplication() : Application() { | ||
| override fun onCreate() { | ||
| super.onCreate() | ||
| MobileAds.initialize(this) | ||
| } | ||
|
|
||
| override val workManagerConfiguration: Configuration | ||
| get() = Configuration.Builder() | ||
| .setWorkerFactory(workerFactory) | ||
| .build() | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 0 additions & 5 deletions
5
core/alarm/src/main/java/com/yapp/alarm/scheduler/PostFortuneTaskScheduler.kt
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
core/common/src/main/java/com/yapp/common/di/FortuneTrackerModule.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| package com.yapp.common.di | ||
|
|
||
| import com.yapp.common.tracker.InMemoryFortuneCreationTracker | ||
| import com.yapp.domain.tracker.FortuneCreationTracker | ||
| import dagger.Binds | ||
| import dagger.Module | ||
| import dagger.hilt.InstallIn | ||
| import dagger.hilt.components.SingletonComponent | ||
| import javax.inject.Singleton | ||
|
|
||
| @Module | ||
| @InstallIn(SingletonComponent::class) | ||
| abstract class FortuneTrackerModule { | ||
| @Binds | ||
| @Singleton | ||
| abstract fun bindFortuneCreationTracker( | ||
| impl: InMemoryFortuneCreationTracker, | ||
| ): FortuneCreationTracker | ||
| } |
27 changes: 27 additions & 0 deletions
27
core/common/src/main/java/com/yapp/common/tracker/InMemoryFortuneCreationTracker.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| package com.yapp.common.tracker | ||
|
|
||
| import com.yapp.domain.model.FortuneCreationState | ||
| import com.yapp.domain.tracker.FortuneCreationTracker | ||
| import kotlinx.coroutines.flow.MutableStateFlow | ||
| import kotlinx.coroutines.flow.StateFlow | ||
| import kotlinx.coroutines.flow.asStateFlow | ||
| import javax.inject.Inject | ||
| import javax.inject.Singleton | ||
|
|
||
| @Singleton | ||
| class InMemoryFortuneCreationTracker @Inject constructor() : FortuneCreationTracker { | ||
| private val _state = MutableStateFlow<FortuneCreationState>(FortuneCreationState.Start) | ||
| override val state: StateFlow<FortuneCreationState> = _state.asStateFlow() | ||
|
|
||
| override fun start() { | ||
| _state.value = FortuneCreationState.Start | ||
| } | ||
|
|
||
| override fun succeed(fortuneId: Long) { | ||
| _state.value = FortuneCreationState.Success(fortuneId) | ||
| } | ||
|
|
||
| override fun fail() { | ||
| _state.value = FortuneCreationState.Failure | ||
| } | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.