From d4eb4aa3515b8f4f58dc26ce4c48a833d012feaf Mon Sep 17 00:00:00 2001 From: Chihchy Date: Tue, 4 Oct 2022 21:48:00 +0800 Subject: [PATCH 1/4] Remove deprecated API calling --- EhPanda/App/Tools/Clients/AppDelegateClient.swift | 1 - EhPanda/View/Setting/GeneralSettingView.swift | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/EhPanda/App/Tools/Clients/AppDelegateClient.swift b/EhPanda/App/Tools/Clients/AppDelegateClient.swift index 857cf639..fdc3adc8 100644 --- a/EhPanda/App/Tools/Clients/AppDelegateClient.swift +++ b/EhPanda/App/Tools/Clients/AppDelegateClient.swift @@ -18,7 +18,6 @@ extension AppDelegateClient { setOrientation: { orientation in .fireAndForget { UIDevice.current.setValue(orientation.rawValue, forKey: "orientation") - UINavigationController.attemptRotationToDeviceOrientation() } }, setOrientationMask: { mask in diff --git a/EhPanda/View/Setting/GeneralSettingView.swift b/EhPanda/View/Setting/GeneralSettingView.swift index 3f46a7e4..454f5f3e 100644 --- a/EhPanda/View/Setting/GeneralSettingView.swift +++ b/EhPanda/View/Setting/GeneralSettingView.swift @@ -49,7 +49,7 @@ struct GeneralSettingView: View { } private var language: String { - Locale.current.localizedString(forLanguageCode: Locale.current.languageCode ?? "") + Locale.current.language.languageCode.map(\.identifier).flatMap(Locale.current.localizedString(forLanguageCode:)) ?? R.string.localizable.generalSettingViewValueDefaultLanguageDescription() } From c50f170e2af593b2182e2fede1d7de8acd2cc16b Mon Sep 17 00:00:00 2001 From: Chihchy Date: Tue, 4 Oct 2022 21:50:58 +0800 Subject: [PATCH 2/4] Update project settings --- EhPanda.xcodeproj/project.pbxproj | 12 ++++++------ .../xcshareddata/xcschemes/EhPanda.xcscheme | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/EhPanda.xcodeproj/project.pbxproj b/EhPanda.xcodeproj/project.pbxproj index eb656df3..68f34eaf 100644 --- a/EhPanda.xcodeproj/project.pbxproj +++ b/EhPanda.xcodeproj/project.pbxproj @@ -108,7 +108,7 @@ AB58A5AC2776B2BC00C0D285 /* AppDelegateStore.swift in Sources */ = {isa = PBXBuildFile; fileRef = AB58A5AB2776B2BC00C0D285 /* AppDelegateStore.swift */; }; AB58A5B22776B99000C0D285 /* AppStore.swift in Sources */ = {isa = PBXBuildFile; fileRef = AB58A5B12776B99000C0D285 /* AppStore.swift */; }; AB5BE67926B95FDD007D4A55 /* ShareViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = AB5BE67826B95FDD007D4A55 /* ShareViewController.swift */; }; - AB5BE68026B95FDD007D4A55 /* ShareExtension.appex in Embed App Extensions */ = {isa = PBXBuildFile; fileRef = AB5BE67626B95FDD007D4A55 /* ShareExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; + AB5BE68026B95FDD007D4A55 /* ShareExtension.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = AB5BE67626B95FDD007D4A55 /* ShareExtension.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; }; AB60D0E9274C7ECE00F899AB /* WaterfallGrid in Frameworks */ = {isa = PBXBuildFile; productRef = AB60D0E8274C7ECE00F899AB /* WaterfallGrid */; }; AB63EADB2699AC8200090535 /* AppEnvMO+CoreDataProperties.swift in Sources */ = {isa = PBXBuildFile; fileRef = AB63EADA2699AC8200090535 /* AppEnvMO+CoreDataProperties.swift */; }; AB63EADD2699AC9100090535 /* AppEnvMO+CoreDataClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = AB63EADC2699AC9100090535 /* AppEnvMO+CoreDataClass.swift */; }; @@ -291,15 +291,15 @@ /* End PBXContainerItemProxy section */ /* Begin PBXCopyFilesBuildPhase section */ - AB5BE68126B95FDD007D4A55 /* Embed App Extensions */ = { + AB5BE68126B95FDD007D4A55 /* Embed Foundation Extensions */ = { isa = PBXCopyFilesBuildPhase; buildActionMask = 2147483647; dstPath = ""; dstSubfolderSpec = 13; files = ( - AB5BE68026B95FDD007D4A55 /* ShareExtension.appex in Embed App Extensions */, + AB5BE68026B95FDD007D4A55 /* ShareExtension.appex in Embed Foundation Extensions */, ); - name = "Embed App Extensions"; + name = "Embed Foundation Extensions"; runOnlyForDeploymentPostprocessing = 0; }; /* End PBXCopyFilesBuildPhase section */ @@ -1384,7 +1384,7 @@ ABC3C7502593696C00E0C11B /* Sources */, ABC3C7512593696C00E0C11B /* Frameworks */, ABC3C7522593696C00E0C11B /* Resources */, - AB5BE68126B95FDD007D4A55 /* Embed App Extensions */, + AB5BE68126B95FDD007D4A55 /* Embed Foundation Extensions */, ); buildRules = ( ); @@ -1440,7 +1440,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 1300; - LastUpgradeCheck = 1240; + LastUpgradeCheck = 1400; TargetAttributes = { AB5BE67526B95FDD007D4A55 = { CreatedOnToolsVersion = 13.0; diff --git a/EhPanda.xcodeproj/xcshareddata/xcschemes/EhPanda.xcscheme b/EhPanda.xcodeproj/xcshareddata/xcschemes/EhPanda.xcscheme index ae4894ce..621870f0 100644 --- a/EhPanda.xcodeproj/xcshareddata/xcschemes/EhPanda.xcscheme +++ b/EhPanda.xcodeproj/xcshareddata/xcschemes/EhPanda.xcscheme @@ -1,6 +1,6 @@ Date: Thu, 3 Nov 2022 13:35:17 +0800 Subject: [PATCH 3/4] Fix pagination --- EhPanda/App/Tools/Defaults.swift | 1 + EhPanda/App/Tools/Parser.swift | 15 +++++++- EhPanda/App/Tools/Utilities/URLUtil.swift | 35 +++++++++++++++---- EhPanda/Models/Support/Misc.swift | 9 +++++ .../Detail/DataFlow/DetailSearchStore.swift | 8 ++--- EhPanda/View/Detail/DetailSearchView.swift | 10 +++--- EhPanda/View/Favorites/FavoritesStore.swift | 8 ++--- EhPanda/View/Favorites/FavoritesView.swift | 10 +++--- .../View/Home/DataFlow/FrontpageStore.swift | 8 ++--- .../View/Home/DataFlow/ToplistsStore.swift | 2 +- EhPanda/View/Home/DataFlow/WatchedStore.swift | 8 ++--- EhPanda/View/Home/FrontpageView.swift | 10 +++--- EhPanda/View/Home/ToplistsView.swift | 10 +++--- EhPanda/View/Home/WatchedView.swift | 10 +++--- EhPanda/View/Search/SearchStore.swift | 8 ++--- EhPanda/View/Search/SearchView.swift | 10 +++--- 16 files changed, 109 insertions(+), 53 deletions(-) diff --git a/EhPanda/App/Tools/Defaults.swift b/EhPanda/App/Tools/Defaults.swift index 581484a1..ad0a61c7 100644 --- a/EhPanda/App/Tools/Defaults.swift +++ b/EhPanda/App/Tools/Defaults.swift @@ -104,6 +104,7 @@ struct Defaults { case letterP = "p" case page = "page" case from = "from" + case next = "next" case favcat = "favcat" case topcat = "tl" case showUser = "showuser" diff --git a/EhPanda/App/Tools/Parser.swift b/EhPanda/App/Tools/Parser.swift index ab063342..878926ea 100644 --- a/EhPanda/App/Tools/Parser.swift +++ b/EhPanda/App/Tools/Parser.swift @@ -1329,7 +1329,20 @@ extension Parser { guard let link = doc.at_xpath("//table [@class='ptt']"), let currentStr = link.at_xpath("//td [@class='ptds']")?.text - else { return PageNumber() } + else { + if let link = doc.at_xpath("//div [@class='searchnav']") { + var isEnabled = false + + for aLink in link.xpath("//a") where aLink.text?.contains("Next") == true { + isEnabled = true + break + } + + return PageNumber(isNextButtonEnabled: isEnabled) + } else { + return PageNumber(isNextButtonEnabled: false) + } + } if let range = currentStr.range(of: "-") { current = (Int(currentStr[range.upperBound...]) ?? 1) - 1 diff --git a/EhPanda/App/Tools/Utilities/URLUtil.swift b/EhPanda/App/Tools/Utilities/URLUtil.swift index 2a85c5be..981d4d3d 100644 --- a/EhPanda/App/Tools/Utilities/URLUtil.swift +++ b/EhPanda/App/Tools/Utilities/URLUtil.swift @@ -17,10 +17,14 @@ struct URLUtil { return Defaults.URL.host.appending(queryItems: queryItems).applyingFilter(filter) } static func moreSearchList(keyword: String, filter: Filter, pageNum: Int, lastID: String) -> URL { - Defaults.URL.host.appending(queryItems: [ - .fSearch: keyword, .page: String(pageNum), .from: lastID - ]) - .applyingFilter(filter) + var queryItems: [Defaults.URL.Component.Key: String] = [.fSearch: keyword] + if AppUtil.galleryHost == .ehentai { + queryItems[.page] = String(pageNum) + queryItems[.from] = lastID + } else { + queryItems[.next] = lastID + } + return Defaults.URL.host.appending(queryItems: queryItems).applyingFilter(filter) } static func frontpageList(filter: Filter, pageNum: Int? = nil) -> URL { var url = Defaults.URL.host @@ -30,7 +34,14 @@ struct URLUtil { return url.applyingFilter(filter) } static func moreFrontpageList(filter: Filter, pageNum: Int, lastID: String) -> URL { - Defaults.URL.host.appending(queryItems: [.page: String(pageNum), .from: lastID]).applyingFilter(filter) + var queryItems = [Defaults.URL.Component.Key: String]() + if AppUtil.galleryHost == .ehentai { + queryItems[.page] = String(pageNum) + queryItems[.from] = lastID + } else { + queryItems[.next] = lastID + } + return Defaults.URL.host.appending(queryItems: queryItems).applyingFilter(filter) } static func popularList(filter: Filter) -> URL { Defaults.URL.popular.applyingFilter(filter) @@ -46,7 +57,12 @@ struct URLUtil { return url.applyingFilter(filter) } static func moreWatchedList(filter: Filter, pageNum: Int, lastID: String, keyword: String = "") -> URL { - var url = Defaults.URL.watched.appending(queryItems: [.page: String(pageNum), .from: lastID]) + var url: URL + if AppUtil.galleryHost == .ehentai { + url = Defaults.URL.watched.appending(queryItems: [.page: String(pageNum), .from: lastID]) + } else { + url = Defaults.URL.watched.appending(queryItems: [.next: lastID]) + } if !keyword.isEmpty { url.append(queryItems: [.fSearch: keyword]) } @@ -78,7 +94,12 @@ struct URLUtil { return url } static func moreFavoritesList(favIndex: Int, pageNum: Int, lastID: String, keyword: String = "") -> URL { - var url = Defaults.URL.favorites.appending(queryItems: [.page: String(pageNum), .from: lastID]) + var url: URL + if AppUtil.galleryHost == .ehentai { + url = Defaults.URL.favorites.appending(queryItems: [.page: String(pageNum), .from: lastID]) + } else { + url = Defaults.URL.favorites.appending(queryItems: [.next: lastID]) + } if favIndex != -1 { url.append(queryItems: [.favcat: String(favIndex)]) } else { diff --git a/EhPanda/Models/Support/Misc.swift b/EhPanda/Models/Support/Misc.swift index fd7b8b38..0c450298 100644 --- a/EhPanda/Models/Support/Misc.swift +++ b/EhPanda/Models/Support/Misc.swift @@ -28,10 +28,19 @@ extension DateFormattable { struct PageNumber: Equatable { var current = 0 var maximum = 0 + var isNextButtonEnabled = true var isSinglePage: Bool { current == 0 && maximum == 0 } + var hasNextPage: Bool { + AppUtil.galleryHost == .ehentai + ? current < maximum + : isNextButtonEnabled + } + mutating func resetPages() { + self = Self() + } } struct QuickSearchWord: Codable, Equatable, Identifiable { diff --git a/EhPanda/View/Detail/DataFlow/DetailSearchStore.swift b/EhPanda/View/Detail/DataFlow/DetailSearchStore.swift index 27495616..7b379e0d 100644 --- a/EhPanda/View/Detail/DataFlow/DetailSearchStore.swift +++ b/EhPanda/View/Detail/DataFlow/DetailSearchStore.swift @@ -137,7 +137,7 @@ let detailSearchReducer = Reducer] = [ environment.databaseClient.cacheGalleries(galleries).fireAndForget() ] - if galleries.isEmpty, pageNumber.current < pageNumber.maximum { + if galleries.isEmpty, pageNumber.hasNextPage { effects.append(.init(value: .fetchMoreGalleries)) } else if !galleries.isEmpty { state.loadingState = .idle diff --git a/EhPanda/View/Detail/DetailSearchView.swift b/EhPanda/View/Detail/DetailSearchView.swift index 00eb7dc6..e3e081b1 100644 --- a/EhPanda/View/Detail/DetailSearchView.swift +++ b/EhPanda/View/Detail/DetailSearchView.swift @@ -121,10 +121,12 @@ struct DetailSearchView: View { QuickSearchButton { viewStore.send(.setNavigation(.quickSearch)) } - JumpPageButton(pageNumber: viewStore.pageNumber) { - viewStore.send(.presentJumpPageAlert) - DispatchQueue.main.asyncAfter(deadline: .now() + 0.2) { - viewStore.send(.setJumpPageAlertFocused(true)) + if AppUtil.galleryHost == .ehentai { + JumpPageButton(pageNumber: viewStore.pageNumber) { + viewStore.send(.presentJumpPageAlert) + DispatchQueue.main.asyncAfter(deadline: .now() + 0.2) { + viewStore.send(.setJumpPageAlertFocused(true)) + } } } } diff --git a/EhPanda/View/Favorites/FavoritesStore.swift b/EhPanda/View/Favorites/FavoritesStore.swift index 1ac860e5..383889ff 100644 --- a/EhPanda/View/Favorites/FavoritesStore.swift +++ b/EhPanda/View/Favorites/FavoritesStore.swift @@ -152,7 +152,7 @@ let favoritesReducer = Reducer] = [ environment.databaseClient.cacheGalleries(galleries).fireAndForget() ] - if galleries.isEmpty, pageNumber.current < pageNumber.maximum { + if galleries.isEmpty, pageNumber.hasNextPage { effects.append(.init(value: .fetchMoreGalleries)) } else if !galleries.isEmpty { state.rawLoadingState[targetFavIndex] = .idle diff --git a/EhPanda/View/Favorites/FavoritesView.swift b/EhPanda/View/Favorites/FavoritesView.swift index 86fa4cfd..b8ff339c 100644 --- a/EhPanda/View/Favorites/FavoritesView.swift +++ b/EhPanda/View/Favorites/FavoritesView.swift @@ -136,10 +136,12 @@ struct FavoritesView: View { QuickSearchButton { viewStore.send(.setNavigation(.quickSearch)) } - JumpPageButton(pageNumber: viewStore.pageNumber ?? .init()) { - viewStore.send(.presentJumpPageAlert) - DispatchQueue.main.asyncAfter(deadline: .now() + 0.2) { - viewStore.send(.setJumpPageAlertFocused(true)) + if AppUtil.galleryHost == .ehentai { + JumpPageButton(pageNumber: viewStore.pageNumber ?? .init()) { + viewStore.send(.presentJumpPageAlert) + DispatchQueue.main.asyncAfter(deadline: .now() + 0.2) { + viewStore.send(.setJumpPageAlertFocused(true)) + } } } } diff --git a/EhPanda/View/Home/DataFlow/FrontpageStore.swift b/EhPanda/View/Home/DataFlow/FrontpageStore.swift index 828f5b2a..169d97d6 100644 --- a/EhPanda/View/Home/DataFlow/FrontpageStore.swift +++ b/EhPanda/View/Home/DataFlow/FrontpageStore.swift @@ -123,7 +123,7 @@ let frontpageReducer = Reducer] = [ environment.databaseClient.cacheGalleries(galleries).fireAndForget() ] - if galleries.isEmpty, pageNumber.current < pageNumber.maximum { + if galleries.isEmpty, pageNumber.hasNextPage { effects.append(.init(value: .fetchMoreGalleries)) } else if !galleries.isEmpty { state.loadingState = .idle diff --git a/EhPanda/View/Home/DataFlow/ToplistsStore.swift b/EhPanda/View/Home/DataFlow/ToplistsStore.swift index 3c833a66..688fc187 100644 --- a/EhPanda/View/Home/DataFlow/ToplistsStore.swift +++ b/EhPanda/View/Home/DataFlow/ToplistsStore.swift @@ -146,7 +146,7 @@ let toplistsReducer = Reducer.co state.keyword = keyword } state.loadingState = .loading - state.pageNumber.current = 0 + state.pageNumber.resetPages() let filter = environment.databaseClient.fetchFilterSynchronously(range: .watched) return WatchedGalleriesRequest(filter: filter, pageNum: pageNum, keyword: state.keyword) .effect.map(WatchedAction.fetchGalleriesDone).cancellable(id: WatchedState.CancelID()) @@ -144,7 +144,7 @@ let watchedReducer = Reducer.co case .success(let (pageNumber, galleries)): guard !galleries.isEmpty else { state.loadingState = .failed(.notFound) - guard pageNumber.current < pageNumber.maximum else { return .none } + guard pageNumber.hasNextPage else { return .none } return .init(value: .fetchMoreGalleries) } state.pageNumber = pageNumber @@ -157,7 +157,7 @@ let watchedReducer = Reducer.co case .fetchMoreGalleries: let pageNumber = state.pageNumber - guard pageNumber.current + 1 <= pageNumber.maximum, + guard pageNumber.hasNextPage, state.footerLoadingState != .loading, let lastID = state.galleries.last?.id else { return .none } @@ -179,7 +179,7 @@ let watchedReducer = Reducer.co var effects: [Effect] = [ environment.databaseClient.cacheGalleries(galleries).fireAndForget() ] - if galleries.isEmpty, pageNumber.current < pageNumber.maximum { + if galleries.isEmpty, pageNumber.hasNextPage { effects.append(.init(value: .fetchMoreGalleries)) } else if !galleries.isEmpty { state.loadingState = .idle diff --git a/EhPanda/View/Home/FrontpageView.swift b/EhPanda/View/Home/FrontpageView.swift index 3e513a73..4886ef45 100644 --- a/EhPanda/View/Home/FrontpageView.swift +++ b/EhPanda/View/Home/FrontpageView.swift @@ -100,10 +100,12 @@ struct FrontpageView: View { FiltersButton { viewStore.send(.setNavigation(.filters)) } - JumpPageButton(pageNumber: viewStore.pageNumber) { - viewStore.send(.presentJumpPageAlert) - DispatchQueue.main.asyncAfter(deadline: .now() + 0.2) { - viewStore.send(.setJumpPageAlertFocused(true)) + if AppUtil.galleryHost == .ehentai { + JumpPageButton(pageNumber: viewStore.pageNumber) { + viewStore.send(.presentJumpPageAlert) + DispatchQueue.main.asyncAfter(deadline: .now() + 0.2) { + viewStore.send(.setJumpPageAlertFocused(true)) + } } } } diff --git a/EhPanda/View/Home/ToplistsView.swift b/EhPanda/View/Home/ToplistsView.swift index f8e02b60..c1cc458f 100644 --- a/EhPanda/View/Home/ToplistsView.swift +++ b/EhPanda/View/Home/ToplistsView.swift @@ -100,10 +100,12 @@ struct ToplistsView: View { viewStore.send(.setToplistsType(type)) } } - JumpPageButton(pageNumber: viewStore.pageNumber ?? .init(), hideText: true) { - viewStore.send(.presentJumpPageAlert) - DispatchQueue.main.asyncAfter(deadline: .now() + 0.2) { - viewStore.send(.setJumpPageAlertFocused(true)) + if AppUtil.galleryHost == .ehentai { + JumpPageButton(pageNumber: viewStore.pageNumber ?? .init(), hideText: true) { + viewStore.send(.presentJumpPageAlert) + DispatchQueue.main.asyncAfter(deadline: .now() + 0.2) { + viewStore.send(.setJumpPageAlertFocused(true)) + } } } } diff --git a/EhPanda/View/Home/WatchedView.swift b/EhPanda/View/Home/WatchedView.swift index e74163b2..bfc9819f 100644 --- a/EhPanda/View/Home/WatchedView.swift +++ b/EhPanda/View/Home/WatchedView.swift @@ -126,10 +126,12 @@ struct WatchedView: View { QuickSearchButton { viewStore.send(.setNavigation(.quickSearch)) } - JumpPageButton(pageNumber: viewStore.pageNumber) { - viewStore.send(.presentJumpPageAlert) - DispatchQueue.main.asyncAfter(deadline: .now() + 0.2) { - viewStore.send(.setJumpPageAlertFocused(true)) + if AppUtil.galleryHost == .ehentai { + JumpPageButton(pageNumber: viewStore.pageNumber) { + viewStore.send(.presentJumpPageAlert) + DispatchQueue.main.asyncAfter(deadline: .now() + 0.2) { + viewStore.send(.setJumpPageAlertFocused(true)) + } } } } diff --git a/EhPanda/View/Search/SearchStore.swift b/EhPanda/View/Search/SearchStore.swift index 5313012e..ae999d80 100644 --- a/EhPanda/View/Search/SearchStore.swift +++ b/EhPanda/View/Search/SearchStore.swift @@ -137,7 +137,7 @@ let searchReducer = Reducer.combin state.lastKeyword = keyword } state.loadingState = .loading - state.pageNumber.current = 0 + state.pageNumber.resetPages() let filter = environment.databaseClient.fetchFilterSynchronously(range: .search) return SearchGalleriesRequest(keyword: state.lastKeyword, filter: filter, pageNum: pageNum) .effect.map(SearchAction.fetchGalleriesDone).cancellable(id: SearchState.CancelID()) @@ -148,7 +148,7 @@ let searchReducer = Reducer.combin case .success(let (pageNumber, galleries)): guard !galleries.isEmpty else { state.loadingState = .failed(.notFound) - guard pageNumber.current < pageNumber.maximum else { return .none } + guard pageNumber.hasNextPage else { return .none } return .init(value: .fetchMoreGalleries) } state.pageNumber = pageNumber @@ -161,7 +161,7 @@ let searchReducer = Reducer.combin case .fetchMoreGalleries: let pageNumber = state.pageNumber - guard pageNumber.current + 1 <= pageNumber.maximum, + guard pageNumber.hasNextPage, state.footerLoadingState != .loading, let lastID = state.galleries.last?.id else { return .none } @@ -183,7 +183,7 @@ let searchReducer = Reducer.combin var effects: [Effect] = [ environment.databaseClient.cacheGalleries(galleries).fireAndForget() ] - if galleries.isEmpty, pageNumber.current < pageNumber.maximum { + if galleries.isEmpty, pageNumber.hasNextPage { effects.append(.init(value: .fetchMoreGalleries)) } else if !galleries.isEmpty { state.loadingState = .idle diff --git a/EhPanda/View/Search/SearchView.swift b/EhPanda/View/Search/SearchView.swift index 126d94ea..a9b7e69d 100644 --- a/EhPanda/View/Search/SearchView.swift +++ b/EhPanda/View/Search/SearchView.swift @@ -121,10 +121,12 @@ struct SearchView: View { QuickSearchButton { viewStore.send(.setNavigation(.quickSearch)) } - JumpPageButton(pageNumber: viewStore.pageNumber) { - viewStore.send(.presentJumpPageAlert) - DispatchQueue.main.asyncAfter(deadline: .now() + 0.2) { - viewStore.send(.setJumpPageAlertFocused(true)) + if AppUtil.galleryHost == .ehentai { + JumpPageButton(pageNumber: viewStore.pageNumber) { + viewStore.send(.presentJumpPageAlert) + DispatchQueue.main.asyncAfter(deadline: .now() + 0.2) { + viewStore.send(.setJumpPageAlertFocused(true)) + } } } } From 88852e63f44329f0fd1550f36932f4ba13c441a4 Mon Sep 17 00:00:00 2001 From: Chihchy Date: Thu, 3 Nov 2022 13:39:21 +0800 Subject: [PATCH 4/4] Update workflows --- .github/workflows/deploy.yml | 4 ++-- .github/workflows/test.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 797bc67e..512a5aee 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -5,8 +5,8 @@ on: - main types: [closed] env: - DEVELOPER_DIR: /Applications/Xcode_14.0.1.app - APP_VERSION: '2.4.2' + DEVELOPER_DIR: /Applications/Xcode_14.1.app + APP_VERSION: '2.4.3' SCHEME_NAME: 'EhPanda' ALTSTORE_JSON_PATH: './AltStore.json' BUILDS_PATH: '/tmp/action-builds' diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8277bd34..ce14b009 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,7 +2,7 @@ name: Test on: [push] env: SCHEME_NAME: 'EhPanda' - DEVELOPER_DIR: /Applications/Xcode_14.0.1.app + DEVELOPER_DIR: /Applications/Xcode_14.1.app jobs: Test: runs-on: macos-12