From 28cb811607c896c97c953c1ee9eaf2b262ccd57a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=9F=E3=81=A4=E3=81=9D=E3=82=99=E3=81=86?= Date: Fri, 24 Sep 2021 21:48:13 +0800 Subject: [PATCH 1/2] fix: new iPad mini & Thumbnail display & pagination issues --- .github/workflows/deploy.yml | 2 +- EhPanda/App/Utility.swift | 2 +- EhPanda/DataFlow/Store.swift | 4 ++-- EhPanda/View/Tools/GalleryThumbnailCell.swift | 3 +-- 4 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 4a998bbd..bf6dd960 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.2.1' + APP_VERSION: '1.2.2' SCHEME_NAME: 'EhPanda' ALTSTORE_JSON_PATH: './AltStore.json' BUILDS_PATH: '/tmp/action-builds' diff --git a/EhPanda/App/Utility.swift b/EhPanda/App/Utility.swift index d0759f36..81dde965 100644 --- a/EhPanda/App/Utility.swift +++ b/EhPanda/App/Utility.swift @@ -108,7 +108,7 @@ var isPad: Bool { } var isPadWidth: Bool { - windowW > 768 + windowW >= 744 } var isSEWidth: Bool { diff --git a/EhPanda/DataFlow/Store.swift b/EhPanda/DataFlow/Store.swift index 7fd1a9eb..f37dbb40 100644 --- a/EhPanda/DataFlow/Store.swift +++ b/EhPanda/DataFlow/Store.swift @@ -442,7 +442,7 @@ final class Store: ObservableObject { appState.homeInfo.moreFavoritesLoadFailed[favIndex] = false let pageNumber = appState.homeInfo.favoritesPageNumbers[favIndex] - if (pageNumber?.current ?? 0) + 1 >= pageNumber?.maximum ?? 1 { break } + if (pageNumber?.current ?? 0) + 1 > pageNumber?.maximum ?? 0 { break } if appState.homeInfo.moreFavoritesLoading[favIndex] == true { break } appState.homeInfo.moreFavoritesLoading[favIndex] = true @@ -496,7 +496,7 @@ final class Store: ObservableObject { appState.homeInfo.moreToplistsLoadFailed[topType.rawValue] = false let pageNumber = appState.homeInfo.toplistsPageNumbers[topType.rawValue] - if pageNumber?.current ?? 0 + 1 >= pageNumber?.maximum ?? 1 { break } + if pageNumber?.current ?? 0 + 1 > pageNumber?.maximum ?? 0 { break } if appState.homeInfo.moreToplistsLoading[topType.rawValue] == true { break } appState.homeInfo.moreToplistsLoading[topType.rawValue] = true diff --git a/EhPanda/View/Tools/GalleryThumbnailCell.swift b/EhPanda/View/Tools/GalleryThumbnailCell.swift index 1d5bceab..2029f509 100644 --- a/EhPanda/View/Tools/GalleryThumbnailCell.swift +++ b/EhPanda/View/Tools/GalleryThumbnailCell.swift @@ -80,7 +80,6 @@ struct GalleryThumbnailCell: View { .font(.caption) Spacer() HStack(spacing: 10) { - Text(gallery.language?.languageAbbr ?? "") if !isSEWidth { HStack(spacing: 2) { Image(systemName: "photo.on.rectangle.angled") @@ -88,7 +87,7 @@ struct GalleryThumbnailCell: View { } } } - .fixedSize().lineLimit(1).font(.footnote) + .lineLimit(1).font(.footnote) .foregroundStyle(.secondary) } .padding(.top, 1) From de1b3a95c6e3778b50683b2f84d66b8476ced4c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=81=9F=E3=81=A4=E3=81=9D=E3=82=99=E3=81=86?= Date: Fri, 24 Sep 2021 22:00:51 +0800 Subject: [PATCH 2/2] Update libraries --- .../project.xcworkspace/xcshareddata/swiftpm/Package.resolved | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EhPanda.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/EhPanda.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index f8232042..b7361cd8 100644 --- a/EhPanda.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/EhPanda.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -33,7 +33,7 @@ "repositoryURL": "https://github.com/tatsuz0u/Kingfisher.git", "state": { "branch": "fix/binder-loaded", - "revision": "31268315fed1d0f5846a592deab3b3959751e482", + "revision": "184d0968c9cbefde319f47e992913ef7bc64de5c", "version": null } },