Add "Write another image" button on success screen

This commit is contained in:
Davide Depau committed 2023-03-15 22:30:58 +01:00
1 parent dd3b4a5d1b
commit 2fcb3a68d9
2 files changed
+12

No files matched your search

@@ -593,6 +593,15 @@ fun SuccessView() {
}) {
Text(stringResource(R.string.support_the_project))
}
val context = LocalContext.current
OutlinedButton(onClick = {
context.startActivity(Intent(context, MainActivity::class.java).apply {
flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_CLEAR_TASK
})
activity?.finish()
}) {
Text(stringResource(R.string.write_another_image))
}
}
}
Card(
+3
View File
@@ -336,4 +336,7 @@
<!-- Error message displayed when the verification failed -->
<string name="the_usb_device_content_does_not_match_the_image">The USB device content does not match the image</string>
<!-- Displayed in the successful write page, when clicked the app goes back to the initial page -->
<string name="write_another_image">Write another image</string>
</resources>