mirror of
https://github.com/MinimalBible/MinimalBible
synced 2024-11-04 23:28:19 -05:00
Expose the modulesByLanguage
Can be refactored later, internal implementation uses the "proper" way of accessing things.
This commit is contained in:
parent
1ea27f50b9
commit
d7e9dd34c9
@ -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<Language> = languageModuleMap.map { it.getKey() }
|
||||
val sortedLanguagesList =
|
||||
|
4
gradle/wrapper/gradle-wrapper.properties
vendored
4
gradle/wrapper/gradle-wrapper.properties
vendored
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user