Skip to content

Commit

Permalink
if any delegations exists, do not show loading indicator (#151)
Browse files Browse the repository at this point in the history
  • Loading branch information
gemdev111 authored Aug 28, 2024
1 parent a550844 commit f80d79b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Gem/Stake/ViewModels/StakeViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class StakeViewModel {
func stakeDelegateionState(delegationModels: [StakeDelegationViewModel]) -> StateViewType<[StakeDelegationViewModel]> {
switch delegatitonsState {
case .noData: return .noData
case .loading: return .loading
case .loading: return delegationModels.isEmpty ? .loading : .loaded(delegationModels)
case .loaded: return delegationModels.isEmpty ? .noData : .loaded(delegationModels)
case .error(let error): return .error(error)
}
Expand Down

0 comments on commit f80d79b

Please sign in to comment.