Commit 755987df authored by stopcovid@lunabee.com's avatar stopcovid@lunabee.com
Browse files

Update to 2.3.3

- Cancel notification if alert has been seen
parent 485e1740
...@@ -43,8 +43,8 @@ android { ...@@ -43,8 +43,8 @@ android {
applicationId "fr.gouv.android.stopcovid" applicationId "fr.gouv.android.stopcovid"
minSdkVersion 21 minSdkVersion 21
targetSdkVersion 30 targetSdkVersion 30
versionCode 184 versionCode 186
versionName "2.3.2" versionName "2.3.3"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
} }
......
...@@ -21,9 +21,12 @@ import androidx.navigation.fragment.findNavController ...@@ -21,9 +21,12 @@ import androidx.navigation.fragment.findNavController
import androidx.navigation.navOptions import androidx.navigation.navOptions
import androidx.navigation.ui.NavigationUI.setupActionBarWithNavController import androidx.navigation.ui.NavigationUI.setupActionBarWithNavController
import androidx.preference.PreferenceManager import androidx.preference.PreferenceManager
import androidx.work.ExistingWorkPolicy
import androidx.work.WorkManager
import com.google.android.material.dialog.MaterialAlertDialogBuilder import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.google.android.material.snackbar.Snackbar import com.google.android.material.snackbar.Snackbar
import com.lunabeestudio.robert.extension.observeEventAndConsume import com.lunabeestudio.robert.extension.observeEventAndConsume
import com.lunabeestudio.stopcovid.Constants
import com.lunabeestudio.stopcovid.R import com.lunabeestudio.stopcovid.R
import com.lunabeestudio.stopcovid.coreui.extension.applyAndConsumeWindowInsetBottom import com.lunabeestudio.stopcovid.coreui.extension.applyAndConsumeWindowInsetBottom
import com.lunabeestudio.stopcovid.coreui.extension.showSnackBar import com.lunabeestudio.stopcovid.coreui.extension.showSnackBar
...@@ -74,6 +77,8 @@ class MainActivity : BaseActivity() { ...@@ -74,6 +77,8 @@ class MainActivity : BaseActivity() {
override fun onResume() { override fun onResume() {
super.onResume() super.onResume()
if (sharedPrefs.alertRiskLevelChanged) { if (sharedPrefs.alertRiskLevelChanged) {
WorkManager.getInstance(applicationContext).cancelUniqueWork(Constants.WorkerNames.AT_RISK_NOTIFICATION)
MaterialAlertDialogBuilder(this).showAlertRiskLevelChanged( MaterialAlertDialogBuilder(this).showAlertRiskLevelChanged(
strings, strings,
sharedPrefs, sharedPrefs,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment