Skip to content

Commit 15793a5

Browse files
authored
Merge pull request #331 from PermanentOrg/feature/VSP-1423-Transition-to-Permanent-mixpanel-API
Fix issue with events
2 parents 7dfe2e1 + 739b1a2 commit 15793a5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

app/src/main/java/org/permanent/permanent/viewmodels/MyFilesViewModel.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -312,11 +312,13 @@ open class MyFilesViewModel(application: Application) : SelectionViewModel(appli
312312
}
313313

314314
override fun onFinished(upload: Upload, succeeded: Boolean) {
315-
folderName.value?.let { sendEvent(RecordEventAction.SUBMIT, data = mapOf("workspace" to it)) }
316315
currentFolder.value?.getUploadQueue()?.removeFinishedUpload(upload)
317316
uploadsAdapter.remove(upload)
318317

319-
if (succeeded) addFakeItemToFilesList(upload)
318+
if (succeeded) {
319+
addFakeItemToFilesList(upload)
320+
folderName.value?.let { sendEvent(RecordEventAction.SUBMIT, data = mapOf("workspace" to it)) }
321+
}
320322
if (uploadsAdapter.itemCount == 0) {
321323
existsFiles.value = true
322324
refreshJob?.cancel()

0 commit comments

Comments
 (0)