diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index cf2dc49e..eab4ffd3 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -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' diff --git a/EhPanda/DataFlow/Store.swift b/EhPanda/DataFlow/Store.swift index ad2ff0d6..8c1d7de2 100644 --- a/EhPanda/DataFlow/Store.swift +++ b/EhPanda/DataFlow/Store.swift @@ -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() diff --git a/EhPanda/View/Detail/AssociatedView.swift b/EhPanda/View/Detail/AssociatedView.swift index 75406b23..881d0997 100644 --- a/EhPanda/View/Detail/AssociatedView.swift +++ b/EhPanda/View/Detail/AssociatedView.swift @@ -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