From 1ee1a410043b8faf7b8d8d9c00b7366c51c104dd Mon Sep 17 00:00:00 2001 From: Bradlee Speice Date: Wed, 12 Nov 2014 23:43:21 -0500 Subject: [PATCH] Switch get() to [] --- .../minimalbible/activity/downloader/manager/BookManager.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/src/main/kotlin/org/bspeice/minimalbible/activity/downloader/manager/BookManager.kt b/app/src/main/kotlin/org/bspeice/minimalbible/activity/downloader/manager/BookManager.kt index 9e99039..7e8ec6d 100644 --- a/app/src/main/kotlin/org/bspeice/minimalbible/activity/downloader/manager/BookManager.kt +++ b/app/src/main/kotlin/org/bspeice/minimalbible/activity/downloader/manager/BookManager.kt @@ -106,7 +106,7 @@ class BookManager(private val installedBooks: Books, val rM: RefreshManager) : * @param b The book to get the current progress of * @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 @@ -120,7 +120,7 @@ class BookManager(private val installedBooks: Books, val rM: RefreshManager) : downloadEvents onNext event if (job.getWorkDone() == job.getTotalWork()) { - inProgressDownloads remove bookMappings.get(job.getJobID()) + inProgressDownloads remove bookMappings[job.getJobID()] bookMappings remove job.getJobID() } else inProgressDownloads.put(it.getValue(), event)