mirror of
https://github.com/yattee/yattee.git
synced 2025-04-25 16:16:29 +00:00
Performance improvements
This commit is contained in:
parent
8ffdd4d51f
commit
3d35a60c7a
@ -28,13 +28,7 @@ struct PlaybackSettings: View {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
#if DEBUG
|
ScrollView {
|
||||||
// TODO: remove
|
|
||||||
if #available(iOS 15.0, macOS 12.0, *) {
|
|
||||||
Self._printChanges()
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
return ScrollView {
|
|
||||||
VStack(alignment: .leading, spacing: 10) {
|
VStack(alignment: .leading, spacing: 10) {
|
||||||
HStack {
|
HStack {
|
||||||
Button {
|
Button {
|
||||||
|
@ -90,13 +90,7 @@ struct VideoPlayerView: View {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var videoPlayer: some View {
|
var videoPlayer: some View {
|
||||||
#if DEBUG
|
GeometryReader { geometry in
|
||||||
// TODO: remove
|
|
||||||
if #available(iOS 15.0, macOS 12.0, *) {
|
|
||||||
Self._printChanges()
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
return GeometryReader { geometry in
|
|
||||||
HStack(spacing: 0) {
|
HStack(spacing: 0) {
|
||||||
content
|
content
|
||||||
.onAppear {
|
.onAppear {
|
||||||
|
@ -20,7 +20,6 @@ struct VideoContextMenuView: View {
|
|||||||
|
|
||||||
@FetchRequest private var watchRequest: FetchedResults<Watch>
|
@FetchRequest private var watchRequest: FetchedResults<Watch>
|
||||||
|
|
||||||
@Default(.saveHistory) private var saveHistory
|
|
||||||
@Default(.showPlayNowInBackendContextMenu) private var showPlayNowInBackendContextMenu
|
@Default(.showPlayNowInBackendContextMenu) private var showPlayNowInBackendContextMenu
|
||||||
|
|
||||||
private var backgroundContext = PersistenceController.shared.container.newBackgroundContext()
|
private var backgroundContext = PersistenceController.shared.container.newBackgroundContext()
|
||||||
@ -44,7 +43,7 @@ struct VideoContextMenuView: View {
|
|||||||
removeAllFromQueueButton()
|
removeAllFromQueueButton()
|
||||||
}
|
}
|
||||||
if !video.localStreamIsDirectory {
|
if !video.localStreamIsDirectory {
|
||||||
if saveHistory {
|
if Defaults[.saveHistory] {
|
||||||
Section {
|
Section {
|
||||||
if let watchedAtString {
|
if let watchedAtString {
|
||||||
Text(watchedAtString)
|
Text(watchedAtString)
|
||||||
@ -72,7 +71,7 @@ struct VideoContextMenuView: View {
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
if showPlayNowInBackendContextMenu {
|
if Defaults[.showPlayNowInBackendContextMenu] {
|
||||||
Section {
|
Section {
|
||||||
ForEach(PlayerBackendType.allCases, id: \.self) { backend in
|
ForEach(PlayerBackendType.allCases, id: \.self) { backend in
|
||||||
playNowInBackendButton(backend)
|
playNowInBackendButton(backend)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user