kopia lustrzana https://gitlab.com/gridtracker.org/gridtracker
Include reading of file on button press for lotw
rodzic
db9b9f6a3f
commit
32514064ee
|
@ -715,6 +715,7 @@ function grabLOtWLog(test)
|
|||
|
||||
if (test == false)
|
||||
{
|
||||
loadLoTWLogFile();
|
||||
nodeTimers.setTimeout(grabLoTWQSO, 500);
|
||||
}
|
||||
}
|
||||
|
@ -1122,11 +1123,19 @@ function loadGtQSOLogFile()
|
|||
}
|
||||
}
|
||||
|
||||
function getFilesizeInBytes(filename)
|
||||
{
|
||||
var fs = require("fs");
|
||||
var stats = fs.statSync(filename);
|
||||
var fileSizeInBytes = stats.size;
|
||||
return fileSizeInBytes;
|
||||
}
|
||||
|
||||
function loadLoTWLogFile()
|
||||
{
|
||||
var fs = require("fs");
|
||||
|
||||
if (fs.existsSync(g_LoTWLogFile))
|
||||
if (fs.existsSync(g_LoTWLogFile) && getFilesizeInBytes(g_LoTWLogFile) > 0)
|
||||
{
|
||||
g_fromDirectCallNoFileDialog = true;
|
||||
onAdiLoadComplete(fs.readFileSync(g_LoTWLogFile), false);
|
||||
|
@ -1430,7 +1439,6 @@ function startupAdifLoadCheck()
|
|||
|
||||
if (loadLOTWCheckBox.checked == true)
|
||||
{
|
||||
loadLoTWLogFile();
|
||||
grabLOtWLog(false);
|
||||
}
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue