More error handling.
This commit is contained in:
parent
9a4cdfafef
commit
37030d157f
1 changed files with 23 additions and 21 deletions
|
|
@ -301,7 +301,7 @@ var pdApp = {
|
||||||
if (!settings.mod || !item.data.distinguished) {
|
if (!settings.mod || !item.data.distinguished) {
|
||||||
if ((edited === false && settings['comments-edit']) && (item.kind === 't1' || item.data.is_self)) {
|
if ((edited === false && settings['comments-edit']) && (item.kind === 't1' || item.data.is_self)) {
|
||||||
pdApp.processInfo.ajax_calls ++;
|
pdApp.processInfo.ajax_calls ++;
|
||||||
/*$.ajax({
|
$.ajax({
|
||||||
url: 'https://www.reddit.com/api/editusertext',
|
url: 'https://www.reddit.com/api/editusertext',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: {
|
data: {
|
||||||
|
|
@ -314,23 +314,21 @@ var pdApp = {
|
||||||
}
|
}
|
||||||
}).then(function() {
|
}).then(function() {
|
||||||
if (settings['comments'] || settings['submissions']) {
|
if (settings['comments'] || settings['submissions']) {
|
||||||
pdApp.process.handle.next(items,true,false);
|
pdApp.process.handle.next(items,true);
|
||||||
} else {
|
} else {
|
||||||
pdApp.process.handle.next(items,false,false);
|
pdApp.process.handle.next(items,false);
|
||||||
}
|
}
|
||||||
}, function (resp) {
|
}, function (resp) {
|
||||||
console.error(resp);
|
console.error(resp);
|
||||||
});*/
|
if (confirm('Error editing item. Retry?')) {
|
||||||
|
pdApp.process.handle.item(items,edited);
|
||||||
if (settings['comments'] || settings['submissions']) {
|
} else {
|
||||||
pdApp.process.handle.next(items,true,false);
|
pdApp.process.handle.next(items,false);
|
||||||
} else {
|
}
|
||||||
pdApp.process.handle.next(items,false,false);
|
});
|
||||||
}
|
|
||||||
|
|
||||||
} else if (settings['comments'] || settings['submissions']) {
|
} else if (settings['comments'] || settings['submissions']) {
|
||||||
pdApp.processInfo.ajax_calls ++;
|
pdApp.processInfo.ajax_calls ++;
|
||||||
/*$.ajax({
|
$.ajax({
|
||||||
url: 'https://www.reddit.com/api/del',
|
url: 'https://www.reddit.com/api/del',
|
||||||
method: 'post',
|
method: 'post',
|
||||||
data: {
|
data: {
|
||||||
|
|
@ -340,26 +338,30 @@ var pdApp = {
|
||||||
renderstyle: 'html'
|
renderstyle: 'html'
|
||||||
}
|
}
|
||||||
}).then(function() {
|
}).then(function() {
|
||||||
pdApp.process.handle.next(items,false,false);
|
pdApp.process.handle.next(items,false);
|
||||||
}, function (resp) {
|
}, function (resp) {
|
||||||
console.error(resp);
|
console.error(resp);
|
||||||
});*/
|
if (confirm('Error deleting item. Retry?')) {
|
||||||
|
pdApp.process.handle.item(items,edited);
|
||||||
pdApp.process.handle.next(items,false,false);
|
} else {
|
||||||
|
pdApp.process.handle.next(items,false);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
pdApp.process.handle.next(items,false);
|
||||||
} else {
|
} else {
|
||||||
pdApp.process.handle.next(items,false,true);
|
pdApp.process.handle.next(items,false);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
pdApp.process.handle.next(items,false,true);
|
pdApp.process.handle.next(items,false);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
pdApp.process.handle.next(items,false,true);
|
pdApp.process.handle.next(items,false);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
pdApp.process.handle.next(items,false,true);
|
pdApp.process.handle.next(items,false);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
pdApp.process.handle.next(items,false,true);
|
pdApp.process.handle.next(items,false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue