mirror of
https://github.com/laurent22/joplin.git
synced 2025-02-13 19:42:36 +02:00
All: Activate Joplin Server optimisations
This commit is contained in:
parent
78f001eb9d
commit
3d03321328
@ -463,14 +463,13 @@ class ConfigScreenComponent extends BaseScreenComponent {
|
||||
return output;
|
||||
}
|
||||
|
||||
private renderFeatureFlags(settings: any): any[] {
|
||||
private renderFeatureFlags(settings: any, featureFlagKeys: string[]): any[] {
|
||||
const updateSettingValue = (key: string, value: any) => {
|
||||
console.info('UPDATE', key, value);
|
||||
return shared.updateSettingValue(this, key, value);
|
||||
};
|
||||
|
||||
const output: any[] = [];
|
||||
for (const key of Setting.featureFlagKeys(AppType.Mobile)) {
|
||||
for (const key of featureFlagKeys) {
|
||||
output.push(this.renderToggle(key, key, settings[key], updateSettingValue));
|
||||
}
|
||||
return output;
|
||||
@ -508,8 +507,11 @@ class ConfigScreenComponent extends BaseScreenComponent {
|
||||
}
|
||||
}
|
||||
|
||||
settingComps.push(this.renderHeader('featureFlags', _('Feature flags')));
|
||||
settingComps.push(<View key="featureFlagsContainer">{this.renderFeatureFlags(settings)}</View>);
|
||||
const featureFlagKeys = Setting.featureFlagKeys(AppType.Mobile);
|
||||
if (featureFlagKeys.length) {
|
||||
settingComps.push(this.renderHeader('featureFlags', _('Feature flags')));
|
||||
settingComps.push(<View key="featureFlagsContainer">{this.renderFeatureFlags(settings, featureFlagKeys)}</View>);
|
||||
}
|
||||
|
||||
settingComps.push(this.renderHeader('moreInfo', _('More information')));
|
||||
|
||||
|
@ -1,7 +1,6 @@
|
||||
import { MultiPutItem } from './file-api';
|
||||
import JoplinError from './JoplinError';
|
||||
import JoplinServerApi from './JoplinServerApi';
|
||||
import Setting from './models/Setting';
|
||||
import { trimSlashes } from './path-utils';
|
||||
|
||||
// All input paths should be in the format: "path/to/file". This is converted to
|
||||
@ -34,11 +33,11 @@ export default class FileApiDriverJoplinServer {
|
||||
}
|
||||
|
||||
public get supportsMultiPut() {
|
||||
return Setting.value('featureFlag.syncMultiPut');
|
||||
return true;
|
||||
}
|
||||
|
||||
public get supportsAccurateTimestamp() {
|
||||
return Setting.value('featureFlag.syncAccurateTimestamps');
|
||||
return true;
|
||||
}
|
||||
|
||||
public requestRepeatCount() {
|
||||
|
@ -1261,19 +1261,19 @@ class Setting extends BaseModel {
|
||||
storage: SettingStorage.Database,
|
||||
},
|
||||
|
||||
'featureFlag.syncAccurateTimestamps': {
|
||||
value: false,
|
||||
type: SettingItemType.Bool,
|
||||
public: false,
|
||||
storage: SettingStorage.File,
|
||||
},
|
||||
// 'featureFlag.syncAccurateTimestamps': {
|
||||
// value: false,
|
||||
// type: SettingItemType.Bool,
|
||||
// public: false,
|
||||
// storage: SettingStorage.File,
|
||||
// },
|
||||
|
||||
'featureFlag.syncMultiPut': {
|
||||
value: false,
|
||||
type: SettingItemType.Bool,
|
||||
public: false,
|
||||
storage: SettingStorage.File,
|
||||
},
|
||||
// 'featureFlag.syncMultiPut': {
|
||||
// value: false,
|
||||
// type: SettingItemType.Bool,
|
||||
// public: false,
|
||||
// storage: SettingStorage.File,
|
||||
// },
|
||||
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user