Fix moar ktlint issues
This commit is contained in:
parent
a831f05f6e
commit
5d086ad82d
528 changed files with 146 additions and 629 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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> {
|
||||
|
|
|
|||
|
|
@ -29,7 +29,6 @@ import io.element.android.libraries.featureflag.impl.StaticFeatureFlagProvider
|
|||
@Module
|
||||
@ContributesTo(AppScope::class)
|
||||
object FeatureFlagModule {
|
||||
|
||||
@JvmStatic
|
||||
@Provides
|
||||
@ElementsIntoSet
|
||||
|
|
|
|||
|
|
@ -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())
|
||||
|
|
|
|||
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue