EventIndex: Hide the feature behind a labs flag.

This commit is contained in:
Damir Jelić 2019-11-19 12:23:49 +01:00
parent 979803797f
commit f776bdcc8b
3 changed files with 13 additions and 1 deletions

View file

@ -21,6 +21,7 @@ limitations under the License.
import PlatformPeg from "./PlatformPeg";
import EventIndex from "./EventIndex";
import SettingsStore from './settings/SettingsStore';
class EventIndexPeg {
constructor() {
@ -34,6 +35,10 @@ class EventIndexPeg {
* EventIndex was successfully initialized, false otherwise.
*/
async init() {
if (!SettingsStore.isFeatureEnabled("feature_event_indexing")) {
return false;
}
const indexManager = PlatformPeg.get().getEventIndexingManager();
if (!indexManager || await indexManager.supportsEventIndexing() !== true) {
console.log("EventIndex: Platform doesn't support event indexing,",