mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-02 12:07:28 +00:00
Add hooks to allow providing additional feature flags in EX pro
We modify the existing `FeaturesProvider` interface so that there can be more than one of them, and the Features provided by *all* of the instances are shown. We can then make another instance in element-android-enterprise, which exposes enterprise-only features.
This commit is contained in:
+21
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
* Copyright (c) 2026 Element Creations Ltd.
|
||||
*
|
||||
* SPDX-License-Identifier: AGPL-3.0-only OR LicenseRef-Element-Commercial.
|
||||
* Please see LICENSE files in the repository root for full details.
|
||||
*/
|
||||
|
||||
package io.element.android.libraries.featureflag.api
|
||||
|
||||
/**
|
||||
* Provides a list of available [Feature]s that the application supports.
|
||||
* Used by [FeatureFlagService.getAvailableFeatures] to obtain a list of features
|
||||
* that can be presented to the user.
|
||||
*
|
||||
* Multiple instances can exist within the application, and all instances are polled
|
||||
* to provide features for the list. This means that additional features can be provided
|
||||
* by compile-time extensions.
|
||||
*/
|
||||
fun interface FeaturesProvider {
|
||||
fun provide(): List<Feature>
|
||||
}
|
||||
Reference in New Issue
Block a user