Open wahyurama-creator opened 10 months ago
Why fetch listener called more than one time? I try save to database, but i see in my database have twice same data.
override fun onCompleted(download: Download) { viewModel.canGoBack.value = true viewModel.setButtonProperties(ProductStatusState.ReadyForRead) binding.apply { tvOfferSelected.text = getString(R.string.text_btn_download_success) val percentageDownload = "${download.progress}%" tvTotalPrice.text = percentageDownload } extractZipFile(applicationContext, viewModel.itemId, zipKey, fileType) saveItemToDatabase(download) }
Same problem and can't to resolve this issue normally (not ugly way).
Why fetch listener called more than one time? I try save to database, but i see in my database have twice same data.
override fun onCompleted(download: Download) { viewModel.canGoBack.value = true viewModel.setButtonProperties(ProductStatusState.ReadyForRead) binding.apply { tvOfferSelected.text = getString(R.string.text_btn_download_success) val percentageDownload = "${download.progress}%" tvTotalPrice.text = percentageDownload } extractZipFile(applicationContext, viewModel.itemId, zipKey, fileType) saveItemToDatabase(download) }