mirror of
https://github.com/MinimalBible/MinimalBible
synced 2024-11-04 23:28:19 -05:00
Switch get() to []
This commit is contained in:
parent
187a73cf92
commit
1ee1a41004
@ -106,7 +106,7 @@ class BookManager(private val installedBooks: Books, val rM: RefreshManager) :
|
|||||||
* @param b The book to get the current progress of
|
* @param b The book to get the current progress of
|
||||||
* @return The most recent DownloadProgressEvent for the book, or null if not downloading
|
* @return The most recent DownloadProgressEvent for the book, or null if not downloading
|
||||||
*/
|
*/
|
||||||
fun getDownloadProgress(b: Book) = inProgressDownloads get b
|
fun getDownloadProgress(b: Book) = inProgressDownloads[b]
|
||||||
|
|
||||||
fun isInstalled(b: Book) = installedBooksList contains b
|
fun isInstalled(b: Book) = installedBooksList contains b
|
||||||
|
|
||||||
@ -120,7 +120,7 @@ class BookManager(private val installedBooks: Books, val rM: RefreshManager) :
|
|||||||
downloadEvents onNext event
|
downloadEvents onNext event
|
||||||
|
|
||||||
if (job.getWorkDone() == job.getTotalWork()) {
|
if (job.getWorkDone() == job.getTotalWork()) {
|
||||||
inProgressDownloads remove bookMappings.get(job.getJobID())
|
inProgressDownloads remove bookMappings[job.getJobID()]
|
||||||
bookMappings remove job.getJobID()
|
bookMappings remove job.getJobID()
|
||||||
} else
|
} else
|
||||||
inProgressDownloads.put(it.getValue(), event)
|
inProgressDownloads.put(it.getValue(), event)
|
||||||
|
Loading…
Reference in New Issue
Block a user