diff --git a/app/src/main/java/it/ministerodellasalute/verificaC19/ui/FirstActivity.kt b/app/src/main/java/it/ministerodellasalute/verificaC19/ui/FirstActivity.kt index 1a5e77b5..42ccbf2c 100644 --- a/app/src/main/java/it/ministerodellasalute/verificaC19/ui/FirstActivity.kt +++ b/app/src/main/java/it/ministerodellasalute/verificaC19/ui/FirstActivity.kt @@ -47,7 +47,6 @@ import androidx.appcompat.app.AppCompatActivity import androidx.core.content.ContextCompat import androidx.core.text.bold import androidx.core.view.isVisible -import androidx.lifecycle.observe import com.google.gson.Gson import dagger.hilt.android.AndroidEntryPoint import it.ministerodellasalute.verificaC19.BuildConfig @@ -59,9 +58,9 @@ import it.ministerodellasalute.verificaC19.ui.extensions.hide import it.ministerodellasalute.verificaC19.ui.extensions.show import it.ministerodellasalute.verificaC19.ui.main.Extras import it.ministerodellasalute.verificaC19.ui.main.MainActivity -import it.ministerodellasalute.verificaC19sdk.data.local.ScanMode -import it.ministerodellasalute.verificaC19sdk.data.local.PrefKeys +import it.ministerodellasalute.verificaC19sdk.data.local.prefs.PrefKeys import it.ministerodellasalute.verificaC19sdk.model.FirstViewModel +import it.ministerodellasalute.verificaC19sdk.model.ScanMode import it.ministerodellasalute.verificaC19sdk.util.ConversionUtility import it.ministerodellasalute.verificaC19sdk.util.FORMATTED_DATE_LAST_SYNC import it.ministerodellasalute.verificaC19sdk.util.TimeUtility.parseTo @@ -139,9 +138,9 @@ class FirstActivity : AppCompatActivity(), View.OnClickListener, } private fun observeScanMode() { - viewModel.scanMode.observe(this, { + viewModel.scanMode.observe(this) { setScanModeButtonText(it) - }) + } } private fun observeSyncStatus() { diff --git a/app/src/main/java/it/ministerodellasalute/verificaC19/ui/main/verification/VerificationFragment.kt b/app/src/main/java/it/ministerodellasalute/verificaC19/ui/main/verification/VerificationFragment.kt index 32aa8e48..018ea87f 100644 --- a/app/src/main/java/it/ministerodellasalute/verificaC19/ui/main/verification/VerificationFragment.kt +++ b/app/src/main/java/it/ministerodellasalute/verificaC19/ui/main/verification/VerificationFragment.kt @@ -31,7 +31,6 @@ import androidx.core.content.ContextCompat import androidx.core.view.isVisible import androidx.fragment.app.Fragment import androidx.fragment.app.viewModels -import androidx.lifecycle.observe import androidx.navigation.fragment.findNavController import androidx.navigation.fragment.navArgs import dagger.hilt.android.AndroidEntryPoint @@ -42,11 +41,7 @@ import it.ministerodellasalute.verificaC19.ui.compounds.QuestionCompound import it.ministerodellasalute.verificaC19sdk.VerificaDownloadInProgressException import it.ministerodellasalute.verificaC19sdk.VerificaMinSDKVersionException import it.ministerodellasalute.verificaC19sdk.VerificaMinVersionException -import it.ministerodellasalute.verificaC19sdk.data.local.ScanMode -import it.ministerodellasalute.verificaC19sdk.model.CertificateStatus -import it.ministerodellasalute.verificaC19sdk.model.CertificateViewBean -import it.ministerodellasalute.verificaC19sdk.model.PersonModel -import it.ministerodellasalute.verificaC19sdk.model.VerificationViewModel +import it.ministerodellasalute.verificaC19sdk.model.* import it.ministerodellasalute.verificaC19sdk.util.FORMATTED_VALIDATION_DATE import it.ministerodellasalute.verificaC19sdk.util.TimeUtility.formatDateOfBirth import it.ministerodellasalute.verificaC19sdk.util.TimeUtility.parseTo @@ -93,7 +88,6 @@ class VerificationFragment : Fragment(), View.OnClickListener { viewModel.inProgress.observe(viewLifecycleOwner) { binding.progressBar.isVisible = it } - try { viewModel.init(args.qrCodeText, true) } catch (e: VerificaMinSDKVersionException) { diff --git a/buildSrc/src/main/java/Dependencies.kt b/buildSrc/src/main/java/Dependencies.kt index fda2c60c..5b5e1964 100644 --- a/buildSrc/src/main/java/Dependencies.kt +++ b/buildSrc/src/main/java/Dependencies.kt @@ -63,7 +63,7 @@ object Deps { const val okhttp = "com.squareup.okhttp3:okhttp:${Versions.okhttp}" const val log_interceptor = "com.squareup.okhttp3:logging-interceptor:${Versions.logging_interceptor}" const val gson_converter = "com.squareup.retrofit2:converter-gson:${Versions.gson_converter}" - + const val gson = "com.google.code.gson:gson:${Versions.gson}" const val dokka_plugin = "org.jetbrains.dokka:kotlin-as-java-plugin:${Versions.dokka}" const val hilt_plugin = "com.google.dagger:hilt-android-gradle-plugin:${Versions.hilt_version}" diff --git a/buildSrc/src/main/java/Versions.kt b/buildSrc/src/main/java/Versions.kt index 5fd3b1c5..4d860c59 100644 --- a/buildSrc/src/main/java/Versions.kt +++ b/buildSrc/src/main/java/Versions.kt @@ -23,6 +23,7 @@ object Versions { + // Base const val gradle = "4.1.3" const val kotlin = "1.4.32" @@ -43,6 +44,7 @@ object Versions { const val androidx_core_testing = "2.1.0" const val test_coroutines = "1.5.0" const val gson_converter = "2.9.0" + const val gson = "2.8.9" const val dokka = "1.5.0"