Fix moar ktlint issues
This commit is contained in:
committed by
Benoit Marty
parent
a831f05f6e
commit
5d086ad82d
-1
@@ -30,7 +30,6 @@ import javax.inject.Inject
|
||||
class DefaultFeatureFlagService @Inject constructor(
|
||||
private val providers: Set<@JvmSuppressWildcards FeatureFlagProvider>
|
||||
) : FeatureFlagService {
|
||||
|
||||
override fun isFeatureEnabledFlow(feature: Feature): Flow<Boolean> {
|
||||
return providers.filter { it.hasFeature(feature) }
|
||||
.sortedByDescending(FeatureFlagProvider::priority)
|
||||
|
||||
-1
@@ -28,7 +28,6 @@ import javax.inject.Inject
|
||||
*/
|
||||
class StaticFeatureFlagProvider @Inject constructor() :
|
||||
FeatureFlagProvider {
|
||||
|
||||
override val priority = LOW_PRIORITY
|
||||
|
||||
override fun isFeatureEnabledFlow(feature: Feature): Flow<Boolean> {
|
||||
|
||||
-1
@@ -29,7 +29,6 @@ import io.element.android.libraries.featureflag.impl.StaticFeatureFlagProvider
|
||||
@Module
|
||||
@ContributesTo(AppScope::class)
|
||||
object FeatureFlagModule {
|
||||
|
||||
@JvmStatic
|
||||
@Provides
|
||||
@ElementsIntoSet
|
||||
|
||||
-1
@@ -23,7 +23,6 @@ import kotlinx.coroutines.test.runTest
|
||||
import org.junit.Test
|
||||
|
||||
class DefaultFeatureFlagServiceTest {
|
||||
|
||||
@Test
|
||||
fun `given service without provider when feature is checked then it returns the default value`() = runTest {
|
||||
val featureFlagService = DefaultFeatureFlagService(emptySet())
|
||||
|
||||
-1
@@ -21,7 +21,6 @@ import kotlinx.coroutines.flow.Flow
|
||||
import kotlinx.coroutines.flow.MutableStateFlow
|
||||
|
||||
class FakeMutableFeatureFlagProvider(override val priority: Int) : MutableFeatureFlagProvider {
|
||||
|
||||
private val enabledFeatures = mutableMapOf<String, MutableStateFlow<Boolean>>()
|
||||
|
||||
override suspend fun setFeatureEnabled(feature: Feature, enabled: Boolean) {
|
||||
|
||||
Reference in New Issue
Block a user