Skip to content

Commit

Permalink
Fix some settings don't make efforts (#87)
Browse files Browse the repository at this point in the history
* Update MainView.swift

* Update PersonAccountView.swift

* Update VideoPlayerView.swift

* Update VideoPlayerView.swift
  • Loading branch information
WindowsMEMZ authored Jan 21, 2024
1 parent 496e16b commit d140f0b
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 12 deletions.
9 changes: 7 additions & 2 deletions DarockBili Watch App/InMain/MainView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ struct MainView: View {
@AppStorage("SESSDATA") var sessdata = ""
@AppStorage("bili_jct") var biliJct = ""
@AppStorage("UpdateTipIgnoreVersion") var updateTipIgnoreVersion = ""
@AppStorage("IsShowNetworkFixing") var isShowNetworkFixing = true
@State var videos = [[String: String]]()
@State var isSearchPresented = false
@State var notice = ""
Expand Down Expand Up @@ -199,12 +200,16 @@ struct MainView: View {
isLoadingNew = false
} else {
isFailedToLoad = true
isNetworkFixPresented = true
if isShowNetworkFixing {
isNetworkFixPresented = true
}
}
}
} else {
isFailedToLoad = true
isNetworkFixPresented = true
if isShowNetworkFixing {
isNetworkFixPresented = true
}
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion DarockBili Watch App/PersonalCenter/PersonAccountView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ struct PersonAccountView: View {
@AppStorage("DedeUserID__ckMd5") var dedeUserID__ckMd5 = ""
@AppStorage("SESSDATA") var sessdata = ""
@AppStorage("bili_jct") var biliJct = ""
@AppStorage("IsShowNetworkFixing") var isShowNetworkFixing = true
@State var isLoginPresented = false
@State var username = ""
@State var userSign = ""
Expand Down Expand Up @@ -239,7 +240,7 @@ struct PersonAccountView: View {
username = respJson["data"]["name"].string ?? ""
userSign = respJson["data"]["sign"].string ?? ""
userFaceUrl = respJson["data"]["face"].string ?? "E"
} else {
} else if isShowNetworkFixing {
isNetworkFixPresented = true
}
}
Expand Down
18 changes: 9 additions & 9 deletions DarockBili Watch App/Video/VideoPlayerView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -122,15 +122,6 @@ struct VideoPlayerView: View {
hideDigitalTime(false)
playerTimer?.invalidate()
}
.accessibilityQuickAction(style: .prompt) {
if isVideoPlayerGestureEnabled {
Button(action: {
player?.pause()
}, label: {

})
}
}
.tag(1)
ScrollView {
VStack {
Expand Down Expand Up @@ -196,6 +187,15 @@ struct VideoPlayerView: View {
// }
}
.ignoresSafeArea()
.accessibilityQuickAction(style: .prompt) {
if isVideoPlayerGestureEnabled {
Button(action: {
player?.pause()
}, label: {
Text("Pause")
})
}
}
.onAppear {
let pExtension = AVExtension(VideoDetailView.willPlayVideoLink)!
player = pExtension.getPlayer()
Expand Down

0 comments on commit d140f0b

Please sign in to comment.