Created
June 20, 2024 15:03
-
-
Save sajjadyousefnia/d4ae38c06e5fcc1488f9a10276621076 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private fun checkRunningDownloads() { | |
val allDownloads = db.appDao().getUnfinishedDownloadsHistory() | |
runningDownloadList.addAll(allDownloads) | |
historyAdapter.notifyDataSetChanged() | |
runningDownloadList.forEach { downloadModel -> | |
val downloadManager = getSystemService(DownloadManager::class.java) | |
observerDownload( | |
downloadId = downloadModel.id, | |
currentDownloadModel = downloadModel, | |
downloadManager = downloadManager | |
) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment