Skip to content

Commit 09ec925

Browse files
authored
Merge pull request #357 from niscy-eudiw/bugfix/add-document-scanner
Updates scanner footer visibility logic
2 parents 6ec5a86 + b5a11bc commit 09ec925

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Modules/feature-issuance/Sources/UI/Document/Add/AddDocumentViewModel.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ final class AddDocumentViewModel<Router: RouterHost>: ViewModel<Router, AddDocum
8282
setState {
8383
$0.copy(
8484
addDocumentCellModels: documents,
85-
showFooterScanner: viewState.addDocumentCellModels.isEmpty
85+
showFooterScanner: showScannerFooter(documents: documents)
8686
)
8787
.copy(error: nil)
8888
}
@@ -377,4 +377,8 @@ final class AddDocumentViewModel<Router: RouterHost>: ViewModel<Router, AddDocum
377377
}
378378
}
379379
}
380+
381+
private func showScannerFooter(documents: [AddDocumentUIModel]) -> Bool {
382+
viewState.config.flow == .noDocument || documents.isEmpty
383+
}
380384
}

0 commit comments

Comments
 (0)