No need to sort AnalyticsProvider (it was copied from PushProvider)

This commit is contained in:
Benoit Marty
2023-07-21 18:12:17 +02:00
parent 287b930dcd
commit 43d28c5a3d
6 changed files with 7 additions and 11 deletions

View File

@@ -22,7 +22,10 @@ import io.element.android.services.analyticsproviders.api.trackers.ErrorTracker
import kotlinx.coroutines.flow.Flow
interface AnalyticsService: AnalyticsTracker, ErrorTracker {
fun getAvailableAnalyticsProviders(): List<AnalyticsProvider>
/**
* Get the available analytics providers.
*/
fun getAvailableAnalyticsProviders(): Set<AnalyticsProvider>
/**
* Return a Flow of Boolean, true if the user has given their consent.

View File

@@ -56,8 +56,8 @@ class DefaultAnalyticsService @Inject constructor(
observeSessions()
}
override fun getAvailableAnalyticsProviders(): List<AnalyticsProvider> {
return analyticsProviders.sortedBy { it.index }
override fun getAvailableAnalyticsProviders(): Set<AnalyticsProvider> {
return analyticsProviders
}
override fun getUserConsent(): Flow<Boolean> {