You've already forked joplin
mirror of
https://github.com/laurent22/joplin.git
synced 2025-11-29 22:48:10 +02:00
Desktop: Improved Nextcloud API error handling
This commit is contained in:
@@ -59,7 +59,7 @@ shared.checkNextcloudApp = async function(comp, settings) {
|
||||
|
||||
comp.setState({ checkNextcloudAppResult: 'checking' });
|
||||
let result = null;
|
||||
const appApi = await reg.syncTargetNextcloud().appApi();
|
||||
const appApi = await reg.syncTargetNextcloud().appApi(settings);
|
||||
|
||||
try {
|
||||
result = await appApi.setupSyncTarget(settings['sync.5.path']);
|
||||
@@ -79,14 +79,16 @@ shared.checkNextcloudApp = async function(comp, settings) {
|
||||
};
|
||||
|
||||
shared.updateSettingValue = function(comp, key, value) {
|
||||
const settings = Object.assign({}, comp.state.settings);
|
||||
const changedSettingKeys = comp.state.changedSettingKeys.slice();
|
||||
settings[key] = Setting.formatValue(key, value);
|
||||
if (changedSettingKeys.indexOf(key) < 0) changedSettingKeys.push(key);
|
||||
comp.setState(state => {
|
||||
const settings = Object.assign({}, state.settings);
|
||||
const changedSettingKeys = state.changedSettingKeys.slice();
|
||||
settings[key] = Setting.formatValue(key, value);
|
||||
if (changedSettingKeys.indexOf(key) < 0) changedSettingKeys.push(key);
|
||||
|
||||
comp.setState({
|
||||
settings: settings,
|
||||
changedSettingKeys: changedSettingKeys,
|
||||
return {
|
||||
settings: settings,
|
||||
changedSettingKeys: changedSettingKeys,
|
||||
};
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user