Skip to content

Commit

Permalink
Implement Pull to Refresh request operation
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomazFB committed Dec 30, 2024
1 parent 5a368b6 commit aea5eaa
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,17 @@ class WooShippingLabelPackageCreationViewModel @Inject constructor(
}

fun onPullToRefresh() {

_viewState.update { it.copy(isRefreshing = true) }
launch {
fetchPredefinedPackages().let { response ->
_viewState.update { viewState ->
viewState.copy(
predefinedPackagesState = response,
isRefreshing = false
)
}
}
}
}

private fun updateCarrierPackagesSelection(
Expand Down

0 comments on commit aea5eaa

Please sign in to comment.