mirror of
https://github.com/laurent22/joplin.git
synced 2024-11-30 08:26:59 +02:00
Mobile: Fixed proxy timeout setting UI
This commit is contained in:
parent
00bc25ed5c
commit
275c80ade5
@ -495,6 +495,9 @@ class ConfigScreenComponent extends BaseScreenComponent {
|
||||
// );
|
||||
} else if (md.type === Setting.TYPE_INT) {
|
||||
const unitLabel = md.unitLabel ? md.unitLabel(value) : value;
|
||||
const minimum = 'minimum' in md ? md.minimum : 0;
|
||||
const maximum = 'maximum' in md ? md.maximum : 10;
|
||||
|
||||
// Note: Do NOT add the minimumTrackTintColor and maximumTrackTintColor props
|
||||
// on the Slider as they are buggy and can crash the app on certain devices.
|
||||
// https://github.com/laurent22/joplin/issues/2733
|
||||
@ -506,7 +509,7 @@ class ConfigScreenComponent extends BaseScreenComponent {
|
||||
</Text>
|
||||
<View style={{ display: 'flex', flexDirection: 'row', alignItems: 'center', flex: 1 }}>
|
||||
<Text style={this.styles().sliderUnits}>{unitLabel}</Text>
|
||||
<Slider key="control" style={{ flex: 1 }} step={md.step} minimumValue={md.minimum} maximumValue={md.maximum} value={value} onValueChange={value => updateSettingValue(key, value)} />
|
||||
<Slider key="control" style={{ flex: 1 }} step={md.step} minimumValue={minimum} maximumValue={maximum} value={value} onValueChange={value => updateSettingValue(key, value)} />
|
||||
</View>
|
||||
</View>
|
||||
);
|
||||
|
@ -1464,6 +1464,7 @@ class Setting extends BaseModel {
|
||||
'net.proxyTimeout': {
|
||||
value: 1,
|
||||
type: SettingItemType.Int,
|
||||
maximum: 60,
|
||||
advanced: true,
|
||||
section: 'sync',
|
||||
isGlobal: true,
|
||||
|
Loading…
Reference in New Issue
Block a user