Skip to content

Commit b72abcd

Browse files
committed
chore: formatting
1 parent db94ee6 commit b72abcd

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

app/src/main/kotlin/me/nanova/summaryexpressive/data/repository/AIProviderConfigRepository.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package me.nanova.summaryexpressive.data.repository
22

33
import kotlinx.coroutines.flow.Flow
4+
import kotlinx.coroutines.flow.emptyFlow
45
import kotlinx.coroutines.flow.map
56
import me.nanova.summaryexpressive.data.AIProviderConfigDao
67
import me.nanova.summaryexpressive.data.AIProviderConfigEntity
@@ -15,11 +16,11 @@ open class AIProviderConfigRepository @Inject constructor(
1516
open val providerConfigsFlow: Flow<Map<String, ProviderConfig>>
1617
get() = aiProviderConfigDao?.getAllConfigsFlow()?.map { entities ->
1718
entities.associate { it.provider to it.toProviderConfig() }
18-
} ?: kotlinx.coroutines.flow.emptyFlow()
19+
} ?: emptyFlow()
1920

2021
open fun getConfigFlow(provider: String): Flow<ProviderConfig?> =
2122
aiProviderConfigDao?.getConfigFlow(provider)?.map { it?.toProviderConfig() }
22-
?: kotlinx.coroutines.flow.emptyFlow()
23+
?: emptyFlow()
2324

2425
open suspend fun getConfig(provider: String): ProviderConfig? =
2526
aiProviderConfigDao?.getConfig(provider)?.toProviderConfig()

app/src/main/kotlin/me/nanova/summaryexpressive/data/repository/UserPreferencesRepository.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import android.content.Context
44
import dagger.hilt.android.qualifiers.ApplicationContext
55
import kotlinx.coroutines.flow.Flow
66
import kotlinx.coroutines.flow.catch
7+
import kotlinx.coroutines.flow.emptyFlow
78
import me.nanova.summaryexpressive.data.local.datastore.userPreferencesDataStore
89
import me.nanova.summaryexpressive.model.UserPreferences
910
import java.io.IOException
@@ -21,7 +22,7 @@ open class UserPreferencesRepository @Inject constructor(
2122
} else {
2223
throw exception
2324
}
24-
} ?: kotlinx.coroutines.flow.emptyFlow()
25+
} ?: emptyFlow()
2526

2627
private suspend fun updatePreferences(transform: suspend (UserPreferences) -> UserPreferences) {
2728
context?.userPreferencesDataStore?.updateData { transform(it) }

0 commit comments

Comments
 (0)