Fix moar ktlint issues

This commit is contained in:
Benoit Marty 2024-01-11 09:41:14 +01:00 committed by Benoit Marty
parent a831f05f6e
commit 5d086ad82d
528 changed files with 146 additions and 629 deletions

View file

@ -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)

View file

@ -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> {

View file

@ -29,7 +29,6 @@ import io.element.android.libraries.featureflag.impl.StaticFeatureFlagProvider
@Module
@ContributesTo(AppScope::class)
object FeatureFlagModule {
@JvmStatic
@Provides
@ElementsIntoSet

View file

@ -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())

View file

@ -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) {