Skip to content
Snippets Groups Projects
Commit b39c7c70 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Prompt to clear the batch download queue if user chooses not to download files

Some users may have unintentionally added files to their batch download queue
and not know how to clear the queue manually, so prompt here for user
friendliness/convenience.
parent 0fbdf31c
No related branches found
No related tags found
1 merge request!455Update branch with changes from master
......@@ -482,14 +482,24 @@ function lib_down()
function logoff(fast)
{
if(bbs.batch_dnload_total && console.yesno(bbs.text(bbs.text.DownloadBatchQ)))
bbs.batch_download();
else {
if(fast)
bbs.hangup();
else
bbs.logoff(/* prompt: */true);
if(bbs.batch_dnload_total) {
var prompt = bbs.text(bbs.text.DownloadBatchQ);
if(prompt.length) {
if(console.yesno(prompt)) {
bbs.batch_download();
return; // hang-up is handled in bbs.batch_download()
}
if(!console.noyes(bbs.text(bbs.text.ClearDownloadQueueQ)))
if(bbs.batch_clear(/* upload_queue */false))
console.putmsg(bbs.text(bbs.text.DownloadQueueCleared));
else
alert("Failed to clear batch download queue!");
}
}
if(fast)
bbs.hangup();
else
bbs.logoff(/* prompt: */true);
}
function upload_file()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment