mirror of
https://github.com/yattee/yattee.git
synced 2025-01-22 12:47:03 +00:00
Fix selection of formats in quality profile
This commit is contained in:
parent
74917a482e
commit
be2d21384d
@ -10,6 +10,7 @@ struct QualityProfileForm: View {
|
||||
|
||||
@State private var valid = false
|
||||
|
||||
@State private var initialized = false
|
||||
@State private var name = ""
|
||||
@State private var backend = PlayerBackendType.mpv
|
||||
@State private var resolution = ResolutionSetting.hd1080p60
|
||||
@ -226,7 +227,7 @@ struct QualityProfileForm: View {
|
||||
}
|
||||
|
||||
func isFormatSelected(_ format: QualityProfile.Format) -> Bool {
|
||||
(editing && formats.isEmpty ? qualityProfile.formats : formats).contains(format)
|
||||
(initialized ? formats : qualityProfile.formats).contains(format)
|
||||
}
|
||||
|
||||
func toggleFormat(_ format: QualityProfile.Format, value: Bool) {
|
||||
@ -282,6 +283,7 @@ struct QualityProfileForm: View {
|
||||
self.backend = qualityProfile.backend
|
||||
self.resolution = qualityProfile.resolution
|
||||
self.formats = .init(qualityProfile.formats)
|
||||
self.initialized = true
|
||||
}
|
||||
|
||||
validate()
|
||||
|
Loading…
Reference in New Issue
Block a user