Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Remove old data with db data #157

Merged
merged 3 commits into from
Nov 13, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading