Skip to content

Commit 1cb03cb

Browse files
Adds refresh with method
1 parent 842a4ad commit 1cb03cb

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

Sources/LoadableView/Protocols/LoadableView/BaseLoadableViewModel.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,11 @@ public extension BaseLoadableViewModel {
9090
self.refresh(showLoading: false)
9191
}
9292

93+
func refresh(with item: Element) {
94+
update(with: item)
95+
refresh()
96+
}
97+
9398
@MainActor
9499
func setLoaded(_ newValue: Element) {
95100
viewState = .loaded(newValue)

0 commit comments

Comments
 (0)