Switch get() to []

This commit is contained in:
Bradlee Speice 2014-11-12 23:43:21 -05:00
parent 187a73cf92
commit 1ee1a41004

View File

@ -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)