Skip to content

Commit 8866b66

Browse files
Merge pull request #559 from bcgov/bugfixes/production-crash
Hotfix
2 parents 77f398a + fb5d111 commit 8866b66

File tree

6 files changed

+2149
-119
lines changed

6 files changed

+2149
-119
lines changed

app/src/main/java/ca/bc/gov/bchealth/MainActivity.kt

-17
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import androidx.work.WorkManager
1818
import ca.bc.gov.bchealth.databinding.ActivityMainBinding
1919
import ca.bc.gov.bchealth.ui.inappupdate.InAppUpdateActivity
2020
import ca.bc.gov.bchealth.utils.InAppUpdateHelper
21-
import ca.bc.gov.bchealth.utils.showErrorSnackbar
2221
import ca.bc.gov.bchealth.utils.showServiceDownMessage
2322
import ca.bc.gov.bchealth.utils.viewBindings
2423
import ca.bc.gov.bchealth.viewmodel.AnalyticsFeatureViewModel
@@ -137,13 +136,6 @@ class MainActivity : AppCompatActivity() {
137136
when (workInfo.state) {
138137
WorkInfo.State.RUNNING -> {
139138
isWorkerStarted = true
140-
val started = workInfo.progress.getBoolean(
141-
FetchAuthenticatedHealthRecordsWorker.RECORD_FETCH_STARTED,
142-
false
143-
)
144-
if (started) {
145-
binding.navHostFragment.showErrorSnackbar(getString(R.string.notification_title_while_fetching_data), binding.bottomNav)
146-
}
147139
}
148140

149141
WorkInfo.State.FAILED -> {
@@ -153,7 +145,6 @@ class MainActivity : AppCompatActivity() {
153145
WorkInfo.State.SUCCEEDED -> {
154146
if (isWorkerStarted) {
155147
inAppUpdate.checkForUpdate(AppUpdateType.FLEXIBLE)
156-
binding.navHostFragment.showErrorSnackbar(getString(R.string.notification_title_on_success), binding.bottomNav)
157148
}
158149
}
159150

@@ -183,14 +174,6 @@ class MainActivity : AppCompatActivity() {
183174
binding.navHostFragment.showServiceDownMessage(this)
184175
return
185176
}
186-
val isRecordFetchFailed =
187-
workData.getBoolean(
188-
FetchAuthenticatedHealthRecordsWorker.FailureReason.IS_RECORD_FETCH_FAILED.value,
189-
false
190-
)
191-
if (isRecordFetchFailed) {
192-
binding.navHostFragment.showErrorSnackbar(getString(R.string.notification_title_on_failed), binding.bottomNav)
193-
}
194177
}
195178
}
196179

app/src/main/java/ca/bc/gov/bchealth/ui/healthrecord/HealthRecordScreen.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ private fun HealthRecordScreenContent(
164164
} else {
165165
Column(
166166
modifier = modifier
167-
.padding(start = 16.dp, top = 16.dp, end = 16.dp)
167+
.padding(16.dp)
168168
.fillMaxSize()
169169
) {
170170
SearchBarUI(modifier = Modifier.fillMaxWidth(), onFilterClicked = onFilterClicked, onSearchQuery = onSearchQuery)

data/schemas/ca.bc.gov.data.datasource.local.MyHealthDataBase/14.json

+2-72
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"formatVersion": 1,
33
"database": {
44
"version": 14,
5-
"identityHash": "276a9e926008aa206fc634d8899c0b77",
5+
"identityHash": "cff70079a468f7fab21b2c8957aa411e",
66
"entities": [
77
{
88
"tableName": "patient",
@@ -1997,82 +1997,12 @@
19971997
},
19981998
"indices": [],
19991999
"foreignKeys": []
2000-
},
2001-
{
2002-
"tableName": "app_feature",
2003-
"createSql": "CREATE TABLE IF NOT EXISTS `${TABLE_NAME}` (`id` INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, `feature_name` TEXT, `feature_name_id` INTEGER, `category_name_id` INTEGER NOT NULL, `feature_icon_id` INTEGER NOT NULL, `destination_id` INTEGER NOT NULL, `destination_param` TEXT, `is_management_enabled` INTEGER NOT NULL DEFAULT false, `quick_access_enabled` INTEGER NOT NULL DEFAULT false)",
2004-
"fields": [
2005-
{
2006-
"fieldPath": "id",
2007-
"columnName": "id",
2008-
"affinity": "INTEGER",
2009-
"notNull": true
2010-
},
2011-
{
2012-
"fieldPath": "featureName",
2013-
"columnName": "feature_name",
2014-
"affinity": "TEXT",
2015-
"notNull": false
2016-
},
2017-
{
2018-
"fieldPath": "featureNameId",
2019-
"columnName": "feature_name_id",
2020-
"affinity": "INTEGER",
2021-
"notNull": false
2022-
},
2023-
{
2024-
"fieldPath": "categoryNameId",
2025-
"columnName": "category_name_id",
2026-
"affinity": "INTEGER",
2027-
"notNull": true
2028-
},
2029-
{
2030-
"fieldPath": "featureIconId",
2031-
"columnName": "feature_icon_id",
2032-
"affinity": "INTEGER",
2033-
"notNull": true
2034-
},
2035-
{
2036-
"fieldPath": "destinationId",
2037-
"columnName": "destination_id",
2038-
"affinity": "INTEGER",
2039-
"notNull": true
2040-
},
2041-
{
2042-
"fieldPath": "destinationParam",
2043-
"columnName": "destination_param",
2044-
"affinity": "TEXT",
2045-
"notNull": false
2046-
},
2047-
{
2048-
"fieldPath": "isManagementEnabled",
2049-
"columnName": "is_management_enabled",
2050-
"affinity": "INTEGER",
2051-
"notNull": true,
2052-
"defaultValue": "false"
2053-
},
2054-
{
2055-
"fieldPath": "isQuickAccessEnabled",
2056-
"columnName": "quick_access_enabled",
2057-
"affinity": "INTEGER",
2058-
"notNull": true,
2059-
"defaultValue": "false"
2060-
}
2061-
],
2062-
"primaryKey": {
2063-
"autoGenerate": true,
2064-
"columnNames": [
2065-
"id"
2066-
]
2067-
},
2068-
"indices": [],
2069-
"foreignKeys": []
20702000
}
20712001
],
20722002
"views": [],
20732003
"setupQueries": [
20742004
"CREATE TABLE IF NOT EXISTS room_master_table (id INTEGER PRIMARY KEY,identity_hash TEXT)",
2075-
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, '276a9e926008aa206fc634d8899c0b77')"
2005+
"INSERT OR REPLACE INTO room_master_table (id,identity_hash) VALUES(42, 'cff70079a468f7fab21b2c8957aa411e')"
20762006
]
20772007
}
20782008
}

0 commit comments

Comments
 (0)