-
Notifications
You must be signed in to change notification settings - Fork 435
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor #1476: migrated data package from java to kotlin
- Loading branch information
1 parent
eed2c75
commit 2c2bc35
Showing
9 changed files
with
265 additions
and
317 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 0 additions & 39 deletions
39
mifospay/src/main/java/org/mifos/mobilewallet/mifospay/data/local/LocalRepository.java
This file was deleted.
Oops, something went wrong.
27 changes: 27 additions & 0 deletions
27
mifospay/src/main/java/org/mifos/mobilewallet/mifospay/data/local/LocalRepository.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package org.mifos.mobilewallet.mifospay.data.local | ||
|
||
import org.mifos.mobilewallet.core.domain.model.client.Client | ||
import javax.inject.Inject | ||
import javax.inject.Singleton | ||
|
||
/** | ||
* Created by naman on 17/6/17. | ||
*/ | ||
@Singleton | ||
class LocalRepository @Inject constructor(val preferencesHelper: PreferencesHelper) { | ||
|
||
val clientDetails: Client | ||
get() { | ||
val details = Client() | ||
details.name = preferencesHelper.fullName | ||
details.clientId = preferencesHelper.clientId | ||
details.externalId = preferencesHelper.clientVpa | ||
return details | ||
} | ||
|
||
fun saveClientData(client: Client) { | ||
preferencesHelper.saveFullName(client.name) | ||
preferencesHelper.clientId = client.clientId | ||
preferencesHelper.clientVpa = client.externalId | ||
} | ||
} |
Oops, something went wrong.