Commit 037b6b2e authored by stopcovid@lunabee.com's avatar stopcovid@lunabee.com
Browse files

Update to 3.7.6

- Fix empty dialog
parent c6a6f3fa
......@@ -314,10 +314,14 @@ class AnalyticsManager(okHttpClient: OkHttpClient, context: Context) : Lifecycle
private fun writeTimestampedEventProtoToFile(file: File, timestampedEventProtoList: ProtoStorage.TimestampedEventProtoList) {
executeActionOnAtomicFile {
val atomicFile = AtomicFile(file)
val fileOutputStream = atomicFile.startWrite()
timestampedEventProtoList.writeTo(fileOutputStream)
atomicFile.finishWrite(fileOutputStream)
try {
val atomicFile = AtomicFile(file)
val fileOutputStream = atomicFile.startWrite()
timestampedEventProtoList.writeTo(fileOutputStream)
atomicFile.finishWrite(fileOutputStream)
} catch (e: Exception) {
Timber.e(e)
}
}
}
......
......@@ -46,8 +46,8 @@ android {
applicationId "fr.gouv.android.stopcovid"
minSdkVersion 21
targetSdkVersion 30
versionCode 358
versionName "3.7.5"
versionCode 360
versionName "3.7.6"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
......
......@@ -77,7 +77,8 @@ class MainActivity : BaseActivity() {
PreferenceManager.getDefaultSharedPreferences(this)
}
private var strings: LocalizedStrings = (application as? LocalizedApplication)?.localizedStrings ?: emptyMap()
private val strings: LocalizedStrings
get() = (application as? LocalizedApplication)?.localizedStrings ?: emptyMap()
override fun onNewIntent(intent: Intent?) {
super.onNewIntent(intent)
......@@ -182,8 +183,7 @@ class MainActivity : BaseActivity() {
}
private fun initStringsObserver() {
(application as? LocalizedApplication)?.liveLocalizedStrings?.observeEventAndConsume(this) { strings ->
this.strings = strings
(application as? LocalizedApplication)?.liveLocalizedStrings?.observeEventAndConsume(this) {
invalidateOptionsMenu()
}
}
......
......@@ -29,6 +29,7 @@ import kotlinx.coroutines.withContext
import timber.log.Timber
import java.io.File
import java.io.FileNotFoundException
import java.io.IOException
import java.util.zip.GZIPInputStream
class KeyFiguresManager(serverManager: ServerManager) : RemoteFileManager(serverManager) {
......@@ -102,7 +103,7 @@ class KeyFiguresManager(serverManager: ServerManager) : RemoteFileManager(server
Keynumbers.KeyNumbersMessage.parseFrom(gzipInputStream)
}
}.toKeyFigures()
} catch (e: FileNotFoundException) {
} catch (e: IOException) {
Timber.w("${localFile.name} not found, falling back to national key figures")
null
}
......
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