AA-24 | Shashidhara | Use preference wrapper to get loan application id
This commit is contained in:
@@ -2,6 +2,8 @@ package com.navi.medici.androidCustomerApp.preferences
|
||||
|
||||
import android.app.Activity
|
||||
import android.content.Context
|
||||
import android.content.SharedPreferences
|
||||
import com.navi.medici.androidCustomerApp.preferences.PreferenceWrapper.PREFS_FILENAME
|
||||
|
||||
object PreferenceManager {
|
||||
fun getPersonId(context: Context): String? {
|
||||
|
||||
@@ -4,7 +4,7 @@ import android.content.Context
|
||||
import android.content.SharedPreferences
|
||||
|
||||
object PreferenceWrapper {
|
||||
val PREFS_FILENAME = "com.navi.medici.androidCustomerApp.preferences"
|
||||
const val PREFS_FILENAME = "com.navi.medici.androidCustomerApp.preferences"
|
||||
|
||||
fun getStringPreference(context: Context, preference: PreferenceNames): String? {
|
||||
val sharedPref: SharedPreferences =
|
||||
|
||||
@@ -16,6 +16,7 @@ import com.navi.medici.androidCustomerApp.R
|
||||
import com.navi.medici.androidCustomerApp.databinding.KycDocumentUploadFragmentBinding
|
||||
import com.navi.medici.androidCustomerApp.preferences.PreferenceManager
|
||||
import com.navi.medici.androidCustomerApp.preferences.PreferenceNames
|
||||
import com.navi.medici.androidCustomerApp.preferences.PreferenceWrapper
|
||||
import com.navi.medici.androidCustomerApp.ui.activities.BottomNavigationActivity
|
||||
import java.lang.Exception
|
||||
|
||||
@@ -91,7 +92,7 @@ class KycDocumentUploadFragment : Fragment() {
|
||||
}
|
||||
|
||||
private fun getLoanApplicationId(): String? {
|
||||
return PreferenceManager.getStringPreference(
|
||||
return PreferenceWrapper.getStringPreference(
|
||||
activity as Activity,
|
||||
PreferenceNames.LOAN_APPLICATION_ID
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user