Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
AloqaIM-Android
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
AloqaIM-Android
Commits
25f854de
Commit
25f854de
authored
Feb 22, 2018
by
Leonardo Aramaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix typo
parent
f664b12b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
SharedPreferencesSettingsRepository.kt
...er/infraestructure/SharedPreferencesSettingsRepository.kt
+3
-3
No files found.
app/src/main/java/chat/rocket/android/server/infraestructure/SharedPreferencesSettingsRepository.kt
View file @
25f854de
...
...
@@ -6,16 +6,16 @@ import chat.rocket.android.server.domain.SettingsRepository
import
chat.rocket.core.internal.SettingsAdapter
import
chat.rocket.core.model.Value
class
SharedPreferencesSettingsRepository
(
private
val
localRe
s
pository
:
LocalRepository
)
:
SettingsRepository
{
class
SharedPreferencesSettingsRepository
(
private
val
localRepository
:
LocalRepository
)
:
SettingsRepository
{
private
val
adapter
=
SettingsAdapter
().
lenient
()
override
fun
save
(
url
:
String
,
settings
:
Map
<
String
,
Value
<
Any
>>)
{
localRe
s
pository
.
save
(
"$SETTINGS_KEY$url"
,
adapter
.
toJson
(
settings
))
localRepository
.
save
(
"$SETTINGS_KEY$url"
,
adapter
.
toJson
(
settings
))
}
override
fun
get
(
url
:
String
):
Map
<
String
,
Value
<
Any
>>?
{
val
settings
=
localRe
s
pository
.
get
(
"$SETTINGS_KEY$url"
)
val
settings
=
localRepository
.
get
(
"$SETTINGS_KEY$url"
)
settings
?.
let
{
return
adapter
.
fromJson
(
it
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment