diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 402008c2..a1a47854 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.1.0' + APP_VERSION: '1.1.1' SCHEME_NAME: 'EhPanda' BUILDS_PATH: '/tmp/action-builds' ARCHIVE_PATH: '/tmp/action-builds/EhPanda.xcarchive' diff --git a/EhPanda/App/Tools/Parser.swift b/EhPanda/App/Tools/Parser.swift index 22a29380..4d30d57b 100644 --- a/EhPanda/App/Tools/Parser.swift +++ b/EhPanda/App/Tools/Parser.swift @@ -1162,7 +1162,7 @@ extension Parser { } for aLink in link.xpath("//a") { if let num = Int(aLink.text ?? "") { - maximum = num + maximum = num - 1 } } return PageNumber(current: current, maximum: maximum) diff --git a/EhPanda/Models/Misc.swift b/EhPanda/Models/Misc.swift index 87c1c40e..c126078c 100644 --- a/EhPanda/Models/Misc.swift +++ b/EhPanda/Models/Misc.swift @@ -17,7 +17,7 @@ typealias ReloadToken = Any struct PageNumber { var current = 0 - var maximum = 1 + var maximum = 0 } struct Greeting: Codable, Equatable { diff --git a/EhPanda/View/Detail/AssociatedView.swift b/EhPanda/View/Detail/AssociatedView.swift index a0d2bcb6..a5fe994d 100644 --- a/EhPanda/View/Detail/AssociatedView.swift +++ b/EhPanda/View/Detail/AssociatedView.swift @@ -119,7 +119,7 @@ private extension AssociatedView { SwiftyBeaver.info( "SearchItemsRequest succeeded", context: [ - "Keyword": keyword.isEmpty ? title : keyword, + "Keyword": keyword.isEmpty ? title : keyword, "PageNumber": pageNumber, "Galleries count": galleries.count ] ) @@ -130,7 +130,7 @@ private extension AssociatedView { "SearchItemsRequest failed", context: [ "Keyword": keyword.isEmpty ? title : keyword, - "Error": loadError as Any + "PageNumber": pageNumber, "Error": loadError as Any ] ) } @@ -169,7 +169,7 @@ private extension AssociatedView { "MoreSearchItemsRequest failed", context: [ "Keyword": keyword, "LastID": lastID, - "PageNum": pageNumber.current + 1, "Error": error + "PageNumber": pageNumber, "Error": error ] ) } @@ -191,8 +191,7 @@ private extension AssociatedView { SwiftyBeaver.info( "MoreSearchItemsRequest succeeded", context: [ - "Keyword": keyword, "LastID": lastID, - "PageNum": pageNumber.current + 1, + "Keyword": keyword, "LastID": lastID, "PageNumber": pageNumber, "Galleries count": galleries.count ] )