Skip to content

Commit

Permalink
chore: refactor/code adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaizen-7 authored Feb 7, 2022
1 parent e4447a5 commit d604d7d
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/src/main/java/Dependencies.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down
2 changes: 2 additions & 0 deletions buildSrc/src/main/java/Versions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
object Versions {



// Base
const val gradle = "4.1.3"
const val kotlin = "1.4.32"
Expand All @@ -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"

Expand Down

0 comments on commit d604d7d

Please sign in to comment.