diff --git a/app/src/main/kotlin/org/bspeice/minimalbible/activity/downloader/manager/LocaleManager.kt b/app/src/main/kotlin/org/bspeice/minimalbible/activity/downloader/manager/LocaleManager.kt index 643eb2d..cb0f5f1 100644 --- a/app/src/main/kotlin/org/bspeice/minimalbible/activity/downloader/manager/LocaleManager.kt +++ b/app/src/main/kotlin/org/bspeice/minimalbible/activity/downloader/manager/LocaleManager.kt @@ -2,15 +2,19 @@ package org.bspeice.minimalbible.activity.downloader.manager import org.crosswire.common.util.Language import rx.Observable +import rx.observables.GroupedObservable class LocaleManager(val rM: RefreshManager) { val currentLanguage = Language.DEFAULT_LANG - val languageModuleMap = rM.flatModules + private val languageModuleMap = rM.flatModules // Language doesn't have hashCode(), so we actually group by its String .groupBy { FixedLanguage(it.getLanguage()) } + val modulesByLanguage = languageModuleMap + .map { GroupedObservable.from(it.getKey(): Language, it) } + // Cast back to the original Language implementation val availableLanguages: Observable = languageModuleMap.map { it.getKey() } val sortedLanguagesList = diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index 5ace921..22421bf 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Wed Oct 22 20:42:04 EDT 2014 +#Fri Nov 07 23:02:34 EST 2014 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-1.12-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-1.12-all.zip