Make uploadDetails not need a parameter
This commit is contained in:
parent
af609afaca
commit
6a6b545979
|
@ -116,9 +116,7 @@ export function syncDetails(remoteDetails = false) {
|
||||||
direction = 'down';
|
direction = 'down';
|
||||||
}
|
}
|
||||||
if (direction === 'up') {
|
if (direction === 'up') {
|
||||||
const details = Object.assign({}, window.currentDictionary);
|
return uploadDetails();
|
||||||
delete details.words;
|
|
||||||
return uploadDetails(details);
|
|
||||||
} else if (direction === 'down') {
|
} else if (direction === 'down') {
|
||||||
window.currentDictionary = Object.assign(window.currentDictionary, remoteDetails);
|
window.currentDictionary = Object.assign(window.currentDictionary, remoteDetails);
|
||||||
saveDictionary();
|
saveDictionary();
|
||||||
|
@ -127,7 +125,9 @@ export function syncDetails(remoteDetails = false) {
|
||||||
return Promise.resolve(true);
|
return Promise.resolve(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function uploadDetails(details) {
|
export function uploadDetails() {
|
||||||
|
const details = Object.assign({}, window.currentDictionary);
|
||||||
|
delete details.words;
|
||||||
return request({
|
return request({
|
||||||
action: 'set-dictionary-details',
|
action: 'set-dictionary-details',
|
||||||
details,
|
details,
|
||||||
|
|
Loading…
Reference in New Issue