Commit 25f854de authored by Leonardo Aramaki's avatar Leonardo Aramaki

Fix typo

parent f664b12b
...@@ -6,16 +6,16 @@ import chat.rocket.android.server.domain.SettingsRepository ...@@ -6,16 +6,16 @@ import chat.rocket.android.server.domain.SettingsRepository
import chat.rocket.core.internal.SettingsAdapter import chat.rocket.core.internal.SettingsAdapter
import chat.rocket.core.model.Value import chat.rocket.core.model.Value
class SharedPreferencesSettingsRepository(private val localRespository: LocalRepository) : SettingsRepository { class SharedPreferencesSettingsRepository(private val localRepository: LocalRepository) : SettingsRepository {
private val adapter = SettingsAdapter().lenient() private val adapter = SettingsAdapter().lenient()
override fun save(url: String, settings: Map<String, Value<Any>>) { override fun save(url: String, settings: Map<String, Value<Any>>) {
localRespository.save("$SETTINGS_KEY$url", adapter.toJson(settings)) localRepository.save("$SETTINGS_KEY$url", adapter.toJson(settings))
} }
override fun get(url: String): Map<String, Value<Any>>? { override fun get(url: String): Map<String, Value<Any>>? {
val settings = localRespository.get("$SETTINGS_KEY$url") val settings = localRepository.get("$SETTINGS_KEY$url")
settings?.let { settings?.let {
return adapter.fromJson(it) return adapter.fromJson(it)
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment