Skip to content

Commit

Permalink
Merge pull request #41 from niscy-eudiw/main
Browse files Browse the repository at this point in the history
Fixed loading state for Credentials and Services selection
  • Loading branch information
stzouvaras authored Dec 4, 2024
2 parents 52c7756 + 05282fa commit 56fed28
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,6 @@ final class CredentialSelectionViewModel<Router: RouterGraph>: ViewModel<Router,
if let documentName {
setState {
$0.copy(
isLoading: false,
documentName: documentName
)
.copy(error: nil)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class ServiceSelectionViewModel<Router: RouterGraph>: ViewModel<Router, ServiceS
super.init(
router: router,
initialState: ServiceSelectionState(
isLoading: true,
isLoading: false,
services: [],
error: nil
)
Expand All @@ -49,7 +49,6 @@ class ServiceSelectionViewModel<Router: RouterGraph>: ViewModel<Router, ServiceS
if !services.isEmpty {
setState {
$0.copy(
isLoading: false,
services: services
)
.copy(error: nil)
Expand All @@ -73,6 +72,11 @@ class ServiceSelectionViewModel<Router: RouterGraph>: ViewModel<Router, ServiceS

func openAuthorization() {
Task {

setState {
$0.copy(isLoading: true).copy(error: nil)
}

do {
if let selectedItem {
try await interactor.createRQESService(selectedItem)
Expand Down

0 comments on commit 56fed28

Please sign in to comment.