Skip to content

Commit 7deed87

Browse files
committed
Fix bootSha1 Hash not found case.
Fix crash when bootsha1 not found in json file.
1 parent b1ac435 commit 7deed87

File tree

1 file changed

+2
-2
lines changed
  • app/src/main/java/com/github/capntrips/kernelflasher/ui/screens/backups

1 file changed

+2
-2
lines changed

app/src/main/java/com/github/capntrips/kernelflasher/ui/screens/backups/BackupsContent.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ fun ColumnScope.BackupsContent(
4646
if (currentBackup.type == "raw") {
4747
DataRow(
4848
label = stringResource(R.string.boot_sha1),
49-
value = currentBackup.bootSha1!!.substring(0, 8),
49+
value = currentBackup.bootSha1?.substring(0, 8) ?: "",
5050
valueStyle = MaterialTheme.typography.titleSmall.copy(
5151
fontFamily = FontFamily.Monospace,
5252
fontWeight = FontWeight.Medium
@@ -122,7 +122,7 @@ fun ColumnScope.BackupsContent(
122122
if (currentBackup.type == "raw") {
123123
DataRow(
124124
label = stringResource(R.string.boot_sha1),
125-
value = currentBackup.bootSha1!!.substring(0, 8),
125+
value = currentBackup.bootSha1?.substring(0, 8) ?: "",
126126
valueStyle = MaterialTheme.typography.titleSmall.copy(
127127
fontFamily = FontFamily.Monospace,
128128
fontWeight = FontWeight.Medium

0 commit comments

Comments
 (0)