Skip to content

Commit

Permalink
Merge pull request #4 from louisg1337/louis_fix_log_email
Browse files Browse the repository at this point in the history
Renamed clear data to something more accurate
  • Loading branch information
louisg1337 authored Jul 5, 2024
2 parents d82b109 + 21e9b70 commit f0656ca
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions www/js/services/shareLocalDBFile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ function localDBHelpers(fileName: string, fileExtension: string = '.txt') {
});
}

function localClearData() {
function localClearTmpFile() {
return new Promise<void>((resolve, reject) => {
window['resolveLocalFileSystemURL'](window['cordova'].file.cacheDirectory, (fs) => {
fs.filesystem.root.getFile(fileName + fileExtension, null, (fileEntry) => {
Expand All @@ -101,7 +101,7 @@ function localDBHelpers(fileName: string, fileExtension: string = '.txt') {
return {

Check warning on line 101 in www/js/services/shareLocalDBFile.ts

View check run for this annotation

Codecov / codecov/patch

www/js/services/shareLocalDBFile.ts#L101

Added line #L101 was not covered by tests
copyFile: localCopyFile,
shareData: localShareFile,
clearData: localClearData,
clearTmpFile: localClearTmpFile,
};
}
export async function sendLocalDBFile(database: string) {
Expand All @@ -111,7 +111,7 @@ export async function sendLocalDBFile(database: string) {
dataMethods

Check warning on line 111 in www/js/services/shareLocalDBFile.ts

View check run for this annotation

Codecov / codecov/patch

www/js/services/shareLocalDBFile.ts#L110-L111

Added lines #L110 - L111 were not covered by tests
.copyFile()
.then(dataMethods.shareData)
.then(dataMethods.clearData)
.then(dataMethods.clearTmpFile)
.then(() => {
logDebug(`File Shared!`);

Check warning on line 116 in www/js/services/shareLocalDBFile.ts

View check run for this annotation

Codecov / codecov/patch

www/js/services/shareLocalDBFile.ts#L115-L116

Added lines #L115 - L116 were not covered by tests
})
Expand Down

0 comments on commit f0656ca

Please sign in to comment.