Skip to content

Commit

Permalink
Merge pull request #426 from NordicSemiconductor/improvement/deeplinks
Browse files Browse the repository at this point in the history
[App] Showing progress indicator when downloading the file
  • Loading branch information
philips77 authored Dec 8, 2023
2 parents 4f0530c + b317144 commit bca1398
Showing 1 changed file with 17 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,20 +84,23 @@ internal fun DFUNotSelectedFileView(viewEntity: NotSelectedFileViewEntity, onEve
WizardStepComponent(
icon = icon,
title = stringResource(id = R.string.dfu_choose_file),
decor = WizardStepAction.Action(
text = stringResource(id = R.string.dfu_select_file),
onClick = {
try {
launcher.launch(DfuBaseService.MIME_TYPE_ZIP)
} catch (e: ActivityNotFoundException) {
try {
launcher.launch("*/*")
} catch (e1: ActivityNotFoundException) {
// Handle
}
}
}
),
decor = if (viewEntity.isRunning)
WizardStepAction.ProgressIndicator
else
WizardStepAction.Action(
text = stringResource(id = R.string.dfu_select_file),
onClick = {
try {
launcher.launch(DfuBaseService.MIME_TYPE_ZIP)
} catch (e: ActivityNotFoundException) {
try {
launcher.launch("*/*")
} catch (e1: ActivityNotFoundException) {
// Handle
}
}
}
),
state = WizardStepState.CURRENT,
) {
if (viewEntity.isError) {
Expand Down

0 comments on commit bca1398

Please sign in to comment.