Skip to content

Commit

Permalink
fix: Remove old data with db data
Browse files Browse the repository at this point in the history
  • Loading branch information
sirambd committed Nov 8, 2024
1 parent c809b93 commit 56acddb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class ImportFilesViewModel @Inject constructor(
isFirstViewModelCreation = false
// Remove old imported files in case it would've crashed or similar to start with a clean slate. This is required
// for already imported files restoration to not pick up old files in some extreme cases.
importationFilesManager.removeLocalCopyFolder()
removeOldData()
} else {
importationFilesManager.restoreAlreadyImportedFiles()
}
Expand Down Expand Up @@ -124,6 +124,11 @@ class ImportFilesViewModel @Inject constructor(
}
}

private suspend fun removeOldData() {
importationFilesManager.removeLocalCopyFolder()
uploadManager.removeAllUploadSession()
}

private fun generateNewUploadSession(): NewUploadSession {
return NewUploadSession(
duration = "30",
Expand Down
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ qrose = "1.0.1"
recaptcha = "18.6.1"
sentry = "4.12.0"
serialization = "1.7.1"
swisstransfer = "0.7.0"
swisstransfer = "0.7.2"
workmanager = "2.9.1"

[libraries]
Expand Down

0 comments on commit 56acddb

Please sign in to comment.