Skip to content

Commit

Permalink
Update support version to iOS / iPadOS 17.0+
Browse files Browse the repository at this point in the history
  • Loading branch information
chihchy committed Jul 11, 2024
1 parent 9a02e11 commit 9809bce
Show file tree
Hide file tree
Showing 13 changed files with 53 additions and 40 deletions.
8 changes: 6 additions & 2 deletions EhPanda.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -2084,6 +2084,7 @@
INFOPLIST_FILE = ShareExtension/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = ShareExtension;
INFOPLIST_KEY_NSHumanReadableCopyright = "";
IPHONEOS_DEPLOYMENT_TARGET = 17.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -2111,6 +2112,7 @@
INFOPLIST_FILE = ShareExtension/Info.plist;
INFOPLIST_KEY_CFBundleDisplayName = ShareExtension;
INFOPLIST_KEY_NSHumanReadableCopyright = "";
IPHONEOS_DEPLOYMENT_TARGET = 17.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -2260,7 +2262,7 @@
DEVELOPMENT_TEAM = 9SKQ7QTZ74;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = EhPanda/App/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
IPHONEOS_DEPLOYMENT_TARGET = 17.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -2289,7 +2291,7 @@
DEVELOPMENT_TEAM = 9SKQ7QTZ74;
ENABLE_PREVIEWS = YES;
INFOPLIST_FILE = EhPanda/App/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 16.0;
IPHONEOS_DEPLOYMENT_TARGET = 17.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand All @@ -2313,6 +2315,7 @@
CURRENT_PROJECT_VERSION = 151;
DEVELOPMENT_TEAM = 9SKQ7QTZ74;
GENERATE_INFOPLIST_FILE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 17.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand All @@ -2339,6 +2342,7 @@
CURRENT_PROJECT_VERSION = 151;
DEVELOPMENT_TEAM = 9SKQ7QTZ74;
GENERATE_INFOPLIST_FILE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 17.0;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down
21 changes: 15 additions & 6 deletions EhPanda/App/Tools/Extensions/ViewModifiers.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,21 +36,30 @@ extension View {
.animation(.linear(duration: 0.1), value: radius)
}

func synchronize<Value: Equatable>(_ first: Binding<Value>, _ second: Binding<Value>) -> some View {
func synchronize<Value: Equatable>(
_ first: Binding<Value>,
_ second: Binding<Value>,
initial: (first: Bool, second: Bool) = (false, false)
) -> some View {
self
.onChange(of: first.wrappedValue) { newValue in
.onChange(of: first.wrappedValue, initial: initial.first) { _, newValue in
second.wrappedValue = newValue
}
.onChange(of: second.wrappedValue) { newValue in
.onChange(of: second.wrappedValue, initial: initial.second) { _, newValue in
first.wrappedValue = newValue
}
}
func synchronize<Value: Equatable>(_ first: Binding<Value>, _ second: FocusState<Value>.Binding) -> some View {

func synchronize<Value>(
_ first: Binding<Value>,
_ second: FocusState<Value>.Binding,
initial: (first: Bool, second: Bool) = (false, false)
) -> some View {
self
.onChange(of: first.wrappedValue) { newValue in
.onChange(of: first.wrappedValue, initial: initial.first) { _, newValue in
second.wrappedValue = newValue
}
.onChange(of: second.wrappedValue) { newValue in
.onChange(of: second.wrappedValue, initial: initial.second) { _, newValue in
first.wrappedValue = newValue
}
}
Expand Down
42 changes: 21 additions & 21 deletions EhPanda/View/Reading/ReadingView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -117,56 +117,56 @@ struct ReadingView: View {
)

// Page
.onChange(of: page.index) { pageIndex in
Logger.info("page.index changed", context: ["pageIndex": pageIndex])
.onChange(of: page.index) { _, newValue in
Logger.info("page.index changed", context: ["pageIndex": newValue])
let newValue = pageHandler.mapFromPager(
index: pageIndex, pageCount: viewStore.gallery.pageCount, setting: setting
index: newValue, pageCount: viewStore.gallery.pageCount, setting: setting
)
pageHandler.sliderValue = .init(newValue)
if viewStore.databaseLoadingState == .idle {
viewStore.send(.syncReadingProgress(.init(newValue)))
}
}
.onChange(of: pageHandler.sliderValue) { sliderValue in
Logger.info("pageHandler.sliderValue changed", context: ["sliderValue": sliderValue])
.onChange(of: pageHandler.sliderValue) { _, newValue in
Logger.info("pageHandler.sliderValue changed", context: ["sliderValue": newValue])
if !viewStore.showsSliderPreview {
setPageIndex(sliderValue: sliderValue)
setPageIndex(sliderValue: newValue)
}
}
.onChange(of: viewStore.showsSliderPreview) { isShown in
Logger.info("viewStore.showsSliderPreview changed", context: ["isShown": isShown])
if !isShown { setPageIndex(sliderValue: pageHandler.sliderValue) }
.onChange(of: viewStore.showsSliderPreview) { _, newValue in
Logger.info("viewStore.showsSliderPreview changed", context: ["isShown": newValue])
if !newValue { setPageIndex(sliderValue: pageHandler.sliderValue) }
setAutoPlayPolocy(.off)
}
.onChange(of: viewStore.readingProgress) { readingProgress in
Logger.info("viewStore.readingProgress changed", context: ["readingProgress": readingProgress])
pageHandler.sliderValue = .init(readingProgress)
.onChange(of: viewStore.readingProgress) { _, newValue in
Logger.info("viewStore.readingProgress changed", context: ["readingProgress": newValue])
pageHandler.sliderValue = .init(newValue)
}

// AutoPlay
.onChange(of: viewStore.route) { route in
Logger.info("viewStore.route changed", context: ["route": route])
if ![.hud, .none].contains(route) {
.onChange(of: viewStore.route) { _, newValue in
Logger.info("viewStore.route changed", context: ["route": newValue])
if ![.hud, .none].contains(newValue) {
setAutoPlayPolocy(.off)
}
}

// LiveText
.onChange(of: liveTextHandler.enablesLiveText) { isEnabled in
Logger.info("liveTextHandler.enablesLiveText changed", context: ["isEnabled": isEnabled])
if isEnabled { viewStore.webImageLoadSuccessIndices.forEach(analyzeImageForLiveText) }
.onChange(of: liveTextHandler.enablesLiveText) { _, newValue in
Logger.info("liveTextHandler.enablesLiveText changed", context: ["isEnabled": newValue])
if newValue { viewStore.webImageLoadSuccessIndices.forEach(analyzeImageForLiveText) }
}
.onChange(of: viewStore.webImageLoadSuccessIndices) { indices in
.onChange(of: viewStore.webImageLoadSuccessIndices) { _, newValue in
Logger.info("viewStore.webImageLoadSuccessIndices changed", context: [
"count": viewStore.webImageLoadSuccessIndices.count
])
if liveTextHandler.enablesLiveText {
indices.forEach(analyzeImageForLiveText)
newValue.forEach(analyzeImageForLiveText)
}
}

// Orientation
.onChange(of: setting.enablesLandscape) { newValue in
.onChange(of: setting.enablesLandscape) { _, newValue in
Logger.info("setting.enablesLandscape changed", context: ["newValue": newValue])
viewStore.send(.setOrientationPortrait(!newValue))
}
Expand Down
2 changes: 1 addition & 1 deletion EhPanda/View/Reading/Support/AdvancedList.swift
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ where PageView: View, Element: Equatable, ID: Hashable, G: Gesture {
}
.onAppear { tryScrollTo(id: pagerModel.index + 1, proxy: proxy) }
}
.onChange(of: pagerModel.index) { newValue in
.onChange(of: pagerModel.index) { _, newValue in
tryScrollTo(id: newValue + 1, proxy: proxy)
}
}
Expand Down
4 changes: 2 additions & 2 deletions EhPanda/View/Setting/EhSetting/EhSettingView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,8 @@ private struct EhProfileSection: View {
}
}
}
.onChange(of: ehProfile) {
performEhProfileAction(nil, nil, $0.value)
.onChange(of: ehProfile) { _, newValue in
performEhProfileAction(nil, nil, newValue.value)
}
.textCase(nil)

Expand Down
2 changes: 1 addition & 1 deletion EhPanda/View/Support/Components/TagSuggestionView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ struct TagSuggestionView: View {
action: { translationHandler.autoComplete(suggestion: suggestion, keyword: &keyword) }
)
}
.onChange(of: keyword) { _ in
.onChange(of: keyword) {
translationHandler.analyze(text: &keyword, translations: translations)
}
}
Expand Down
2 changes: 1 addition & 1 deletion EhPanda/View/TabBar/TabBarView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ struct TabBarView: View {
unwrapping: viewStore.$appRouteState.route,
case: /AppRouteReducer.Route.hud
)
.onChange(of: scenePhase) { viewStore.send(.onScenePhaseChange($0)) }
.onChange(of: scenePhase) { _, newValue in viewStore.send(.onScenePhaseChange(newValue)) }
.onOpenURL { viewStore.send(.appRoute(.handleDeepLink($0))) }
}
}
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ https://ehpanda.app: [main.js](https://github.com/EhPanda-Team/ehpanda-website/b
2. Use some software like [AltStore](https://altstore.io) to install the ipa file on your device.

## System Requirements
This app requires iOS / iPadOS 16.0 or later.
This app requires iOS / iPadOS 17.0 or later.

## Content & Copyright
The content in this application is derived from E-Hentai, which is user-generated content.
Expand Down
2 changes: 1 addition & 1 deletion READMEs/README.chs.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ https://ehpanda.app: [main.js](https://github.com/EhPanda-Team/ehpanda-website/b
2. 使用 [AltStore](https://altstore.io) 这类软件将 ipa 文件安装到你的设备。

## 系统要求
请确保你的设备系统为 iOS / iPadOS 16.0 以上。
请确保你的设备系统为 iOS / iPadOS 17.0 以上。

## 内容及其著作权
本应用程序中的内容均来自 E-Hentai,而 E-Hentai 的内容均为用户生成内容。
Expand Down
2 changes: 1 addition & 1 deletion READMEs/README.cht.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ https://ehpanda.app: [main.js](https://github.com/EhPanda-Team/ehpanda-website/b
2. 使用 [AltStore](https://altstore.io) 這類軟件將 ipa 文件安裝到你的裝置。

## 系統需求
須使用 iOS / iPadOS 16.0 或以上版本。
須使用 iOS / iPadOS 17.0 或以上版本。

## 內容及其著作權
本應用程式內的內容均來自 E-Hentai,而 E-Hentai 的內容均為用戶生成內容。
Expand Down
2 changes: 1 addition & 1 deletion READMEs/README.de.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ https://ehpanda.app: [main.js](https://github.com/EhPanda-Team/ehpanda-website/b
2. Nutze eine Programm zur Installation von nicht im Appstore gelisteten Dateien wie z.B. [AltStore](https://altstore.io) um die IPA-Datei zu installieren.

## Systemanforderungen
Diese App erfordert iOS / iPadOS 16.0 oder neuer.
Diese App erfordert iOS / iPadOS 17.0 oder neuer.

## Inhalte & Copyright
Der Inhalt der von dieser App verwaltet wird, wird von E-Hentai geladen. Hierbei handelt es sich um von anderen Nutzern generierten Inhalt.
Expand Down
2 changes: 1 addition & 1 deletion READMEs/README.jpn.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ https://ehpanda.app: [main.js](https://github.com/EhPanda-Team/ehpanda-website/b
2. [AltStore](https://altstore.io) とかで ipa ファイルをデバイスにインストール。

## 必要システム構成
デバイスのシステムが iOS・iPadOS 16.0 以上であることが必要です
iOS・iPadOS 17.0 以上が必要です

## コンテンツとその著作権
本アプリの内容はすべて E-Hentai 由来のもので、E-Hentai の内容もまたすべてユーザー生成コンテンツです。
Expand Down
2 changes: 1 addition & 1 deletion READMEs/README.ko.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ https://ehpanda.app: [main.js](https://github.com/EhPanda-Team/ehpanda-website/b
2. [AltStore](https://altstore.io)를 사용해서 ipa 파일을 설치할 수 있습니다.

## 시스템 요구 사항
iOS / iPadOS 버전이 16.0 이상인지 확인해주세요.
iOS / iPadOS 버전이 17.0 이상인지 확인해주세요.

## 컨텐츠와 저작권
이 앱의 내용은 E-Hentai을 통해 제공되고, E-Hentai의 모든 내용은 앱 이용자가 만듭니다.
Expand Down

0 comments on commit 9809bce

Please sign in to comment.