refactor prefname

This commit is contained in:
Pritimay Sarkar
2024-01-14 11:14:10 +05:30
parent 5a309e1b24
commit f0f3fcea0a
12 changed files with 12 additions and 12 deletions

View File

@@ -55,7 +55,7 @@ class KitScanActivity : AppCompatActivity() {
super.onCreate(savedInstanceState)
binding = ActivityKitScanBinding.inflate(layoutInflater)
sharedPreference = this.getSharedPreferences("PREFERENCE_NAME", Context.MODE_PRIVATE)
sharedPreference = this.getSharedPreferences("HEMOCUBE", Context.MODE_PRIVATE)
setContentView(binding.root)
if (DataHolder.sampleReadCounter <= Constants.MAXIMUM_TEST_ALLOWED_BEFORE_REFERENCE && DataHolder.isReferenceTaken) {

View File

@@ -18,7 +18,7 @@ class AssuranceControlsFragment: Fragment() {
): View {
binding = FragmentAssuranceControlsBinding.inflate(inflater, container, false)
sharedPreferences =
requireContext().getSharedPreferences("ASSURANCE", Context.MODE_PRIVATE)
requireContext().getSharedPreferences("HEMOCUBE", Context.MODE_PRIVATE)
return binding.root
}
}

View File

@@ -33,7 +33,7 @@ class AutoDacFragment: Fragment() {
): View {
binding = FragmentAutoDacBinding.inflate(inflater, container, false)
sharedPreferences =
requireContext().getSharedPreferences("AUTO_DAC", Context.MODE_PRIVATE)
requireContext().getSharedPreferences("HEMOCUBE", Context.MODE_PRIVATE)
return binding.root
}

View File

@@ -27,7 +27,7 @@ class AutoDacViewModel @Inject constructor(
val progressBar = MutableLiveData(false)
val messages = MutableLiveData<String>()
private val sharedPreference: SharedPreferences =
context.getSharedPreferences("AUTO_DAC", Context.MODE_PRIVATE)
context.getSharedPreferences("HEMOCUBE", Context.MODE_PRIVATE)
private val _networkStatusLiveData = NetworkStatusLiveData(context)
val allUserData = hemoCubeDao.getAll()

View File

@@ -60,7 +60,7 @@ class HemoCubeBufferCheckFragment : Fragment() {
): View {
binding = FragmentHemoCubeReferenceBinding.inflate(inflater, container, false)
sharedPreferences =
requireContext().getSharedPreferences("PREFERENCE_NAME", Context.MODE_PRIVATE)
requireContext().getSharedPreferences("HEMOCUBE", Context.MODE_PRIVATE)
return binding.root
}

View File

@@ -33,7 +33,7 @@ class CalibrationFragment: Fragment() {
): View {
binding = FragmentCalibrationBinding.inflate(inflater, container, false)
sharedPreferences =
requireContext().getSharedPreferences("AUTO_DAC", Context.MODE_PRIVATE)
requireContext().getSharedPreferences("HEMOCUBE", Context.MODE_PRIVATE)
return binding.root
}

View File

@@ -27,7 +27,7 @@ class CalibrationViewModel @Inject constructor(
val progressBar = MutableLiveData(false)
val messages = MutableLiveData<String>()
private val sharedPreference: SharedPreferences =
context.getSharedPreferences("CALIBRATION", Context.MODE_PRIVATE)
context.getSharedPreferences("HEMOCUBE", Context.MODE_PRIVATE)
private val _networkStatusLiveData = NetworkStatusLiveData(context)
val allUserData = hemoCubeDao.getAll()

View File

@@ -38,7 +38,7 @@ class DiagnosticsFragment : Fragment() {
): View {
binding = FragmentDiagnosticsBinding.inflate(inflater, container, false)
sharedPreferences =
requireContext().getSharedPreferences("PREFERENCE_NAME", Context.MODE_PRIVATE)
requireContext().getSharedPreferences("HEMOCUBE", Context.MODE_PRIVATE)
return binding.root
}

View File

@@ -33,7 +33,7 @@ class DiagnosticsViewModel @Inject constructor(
val progressBar = MutableLiveData(false)
val messages = MutableLiveData<String>()
private val sharedPreference: SharedPreferences =
context.getSharedPreferences("DIAGNOSTICS", Context.MODE_PRIVATE)
context.getSharedPreferences("HEMOCUBE", Context.MODE_PRIVATE)
private val _networkStatusLiveData = NetworkStatusLiveData(context)
val allUserData = hemoCubeDao.getAll()

View File

@@ -31,7 +31,7 @@ class DigitalCardFragment : Fragment() {
): View {
binding = FragmentDigitalCardBinding.inflate(inflater, container, false)
sharedPreferences =
requireContext().getSharedPreferences("PREFERENCE_NAME", Context.MODE_PRIVATE)
requireContext().getSharedPreferences("HEMOCUBE", Context.MODE_PRIVATE)
return binding.root
}

View File

@@ -63,7 +63,7 @@ class HemoCubeViewModel @Inject constructor(
private val testDetails = DataHolder.selectedTest?.toHemoCubeTestData()
val messages = MutableLiveData<String>()
private val sharedPreference: SharedPreferences =
context.getSharedPreferences("PREFERENCE_NAME", Context.MODE_PRIVATE)
context.getSharedPreferences("HEMOCUBE", Context.MODE_PRIVATE)
private val workManager = WorkManager.getInstance(context)

View File

@@ -40,7 +40,7 @@ class TestRightResults : Fragment() {
): View {
binding = FragmentTestRightResultsBinding.inflate(inflater, container, false)
sharedPreference =
requireContext().getSharedPreferences("PREFERENCE_NAME", Context.MODE_PRIVATE)
requireContext().getSharedPreferences("HEMOCUBE", Context.MODE_PRIVATE)
return binding.root
}