Skip to content

Commit

Permalink
Merge pull request #146 from tatsuz0u/develop
Browse files Browse the repository at this point in the history
Bugfix
  • Loading branch information
tatsuz0u authored Sep 26, 2021
2 parents 97dfd0f + 75f823a commit 335beea
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
types: [closed]
env:
DEVELOPER_DIR: /Applications/Xcode_13.0.app
APP_VERSION: '1.3.0'
APP_VERSION: '1.3.1'
SCHEME_NAME: 'EhPanda'
ALTSTORE_JSON_PATH: './AltStore.json'
BUILDS_PATH: '/tmp/action-builds'
Expand Down
29 changes: 15 additions & 14 deletions EhPanda/DataFlow/Store.swift
Original file line number Diff line number Diff line change
Expand Up @@ -169,21 +169,22 @@ final class Store: ObservableObject {

// MARK: Fetch Data
case .handleJumpPage(let index, let keyword):
switch appState.environment.homeListType {
case .search:
if let keyword = keyword {
dispatch(.fetchSearchItems(keyword: keyword, pageNum: index))
DispatchQueue.main.async { [weak self] in
switch appState.environment.homeListType {
case .search:
guard let keyword = keyword else { break }
self?.dispatch(.fetchSearchItems(keyword: keyword, pageNum: index))
case .frontpage:
self?.dispatch(.fetchFrontpageItems(pageNum: index))
case .watched:
self?.dispatch(.fetchWatchedItems(pageNum: index))
case .favorites:
self?.dispatch(.fetchFavoritesItems(pageNum: index))
case .toplists:
self?.dispatch(.fetchToplistsItems(pageNum: index))
case .popular, .downloaded, .history:
break
}
case .frontpage:
dispatch(.fetchFrontpageItems(pageNum: index))
case .watched:
dispatch(.fetchWatchedItems(pageNum: index))
case .favorites:
dispatch(.fetchFavoritesItems(pageNum: index))
case .toplists:
dispatch(.fetchToplistsItems(pageNum: index))
case .popular, .downloaded, .history:
break
}
case .fetchIgneous:
appCommand = FetchIgneousCommand()
Expand Down
2 changes: 1 addition & 1 deletion EhPanda/View/Detail/AssociatedView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ private extension AssociatedView {
func fetchMoreAssociatedItems() {
moreLoadFailedFlag = false
guard let lastID = associatedItems.last?.id,
pageNumber.current + 1 < pageNumber.maximum,
pageNumber.current + 1 <= pageNumber.maximum,
!moreLoadingFlag else { return }
moreLoadingFlag = true

Expand Down

0 comments on commit 335beea

Please sign in to comment.