Skip to content

Commit

Permalink
fixed reloading pages
Browse files Browse the repository at this point in the history
  • Loading branch information
ThasianX committed Jul 15, 2020
1 parent 6c35645 commit 2702cc4
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,6 @@ struct ElegantListController: UIViewControllerRepresentable, ElegantListManagerD
self.setActiveIndex(1, animated: false, complete: true)
}
}
case .reloadAll:
controller.reset(manager: manager) {
self.setActiveIndex(self.manager.activeIndex, animated: false, complete: true)
}
case .completed:
()
}
Expand Down
1 change: 0 additions & 1 deletion Sources/ElegantPages/Models/Internal/PageState.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ enum PageState {

case rearrange
case scroll(animated: Bool)
case reloadAll
case completed

}
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public class ElegantListManager: ObservableObject {
}

public func reloadPages() {
currentPage = (currentPage.index, .reloadAll)
currentPage = (currentPage.index, .scroll(animated: false))
}

// Only ever called for a page view with more than 3 pages
Expand Down

0 comments on commit 2702cc4

Please sign in to comment.