mirror of https://github.com/vector-im/riot-web
EventIndex: Hide the feature behind a labs flag.
parent
979803797f
commit
f776bdcc8b
|
@ -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,",
|
||||
|
|
|
@ -1829,5 +1829,6 @@
|
|||
"If you didn't remove the recovery method, an attacker may be trying to access your account. Change your account password and set a new recovery method immediately in Settings.": "If you didn't remove the recovery method, an attacker may be trying to access your account. Change your account password and set a new recovery method immediately in Settings.",
|
||||
"Failed to set direct chat tag": "Failed to set direct chat tag",
|
||||
"Failed to remove tag %(tagName)s from room": "Failed to remove tag %(tagName)s from room",
|
||||
"Failed to add tag %(tagName)s to room": "Failed to add tag %(tagName)s to room"
|
||||
"Failed to add tag %(tagName)s to room": "Failed to add tag %(tagName)s to room",
|
||||
"Enable local event indexing and E2EE search (requires restart)": "Enable local event indexing and E2EE search (requires restart)"
|
||||
}
|
||||
|
|
|
@ -120,6 +120,12 @@ export const SETTINGS = {
|
|||
supportedLevels: LEVELS_FEATURE,
|
||||
default: false,
|
||||
},
|
||||
"feature_event_indexing": {
|
||||
isFeature: true,
|
||||
supportedLevels: LEVELS_DEVICE_ONLY_SETTINGS,
|
||||
displayName: _td("Enable local event indexing and E2EE search (requires restart)"),
|
||||
default: false,
|
||||
},
|
||||
"useCiderComposer": {
|
||||
displayName: _td("Use the new, faster, composer for writing messages"),
|
||||
supportedLevels: LEVELS_ACCOUNT_SETTINGS,
|
||||
|
|
Loading…
Reference in New Issue