Skip to content

Commit 12f5dec

Browse files
committed
Chore: 오타수정
1 parent 9d4add3 commit 12f5dec

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

data/src/main/java/com/threegap/bitnagil/data/emotion/repositoryImpl/EmotionRepositoryImpl.kt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import javax.inject.Inject
1919

2020
class EmotionRepositoryImpl @Inject constructor(
2121
private val emotionRemoteDataSource: EmotionRemoteDataSource,
22-
private val emotionLocalDateSource: EmotionLocalDataSource,
22+
private val emotionLocalDataSource: EmotionLocalDataSource,
2323
) : EmotionRepository {
2424

2525
private val fetchMutex = Mutex()
@@ -48,36 +48,36 @@ class EmotionRepositoryImpl @Inject constructor(
4848
}
4949

5050
emitAll(
51-
emotionLocalDateSource.dailyEmotion
51+
emotionLocalDataSource.dailyEmotion
5252
.filterNotNull()
5353
.map { Result.success(it) },
5454
)
5555
}
5656

5757
override fun clearCache() {
58-
emotionLocalDateSource.clearCache()
58+
emotionLocalDataSource.clearCache()
5959
}
6060

6161
private suspend fun fetchAndSaveDailyEmotion(
6262
today: LocalDate,
6363
forceRefresh: Boolean = false,
6464
): Result<DailyEmotion> {
6565
if (!forceRefresh) {
66-
val currentLocalData = emotionLocalDateSource.dailyEmotion.value
66+
val currentLocalData = emotionLocalDataSource.dailyEmotion.value
6767
if (currentLocalData != null && !currentLocalData.isStale(today)) {
6868
return Result.success(currentLocalData)
6969
}
7070
}
7171

7272
return fetchMutex.withLock {
7373
if (!forceRefresh) {
74-
val doubleCheckData = emotionLocalDateSource.dailyEmotion.value
74+
val doubleCheckData = emotionLocalDataSource.dailyEmotion.value
7575
if (doubleCheckData != null && !doubleCheckData.isStale(today)) {
7676
return@withLock Result.success(doubleCheckData)
7777
}
7878
}
7979
emotionRemoteDataSource.fetchDailyEmotion(today.toString())
80-
.onSuccess { emotionLocalDateSource.saveDailyEmotion(it.toDomain(today)) }
80+
.onSuccess { emotionLocalDataSource.saveDailyEmotion(it.toDomain(today)) }
8181
.map { it.toDomain(today) }
8282
}
8383
}

0 commit comments

Comments
 (0)