Fix settings reacting to language change
This commit is contained in:
@ -2,7 +2,11 @@ import SwiftUI
|
||||
|
||||
struct SettingsContentView: View {
|
||||
|
||||
let section: SettingsSection
|
||||
@Binding
|
||||
var language: ContentLanguage
|
||||
|
||||
@Binding
|
||||
var section: SettingsSection
|
||||
|
||||
@EnvironmentObject
|
||||
private var content: Content
|
||||
@ -14,19 +18,21 @@ struct SettingsContentView: View {
|
||||
case .paths:
|
||||
PathSettingsView()
|
||||
case .navigationBar:
|
||||
NavigationBarSettingsView()
|
||||
NavigationBarSettingsView(language: $language)
|
||||
case .postFeed:
|
||||
PostFeedSettingsView(postSettings: content.settings.posts)
|
||||
PostFeedSettingsView(language: $language, postSettings: content.settings.posts)
|
||||
case .pages:
|
||||
PageSettingsDetailView(pageSettings: content.settings.pages)
|
||||
PageSettingsDetailView(language: $language, pageSettings: content.settings.pages)
|
||||
case .tagOverview:
|
||||
TagOverviewDetailView()
|
||||
TagOverviewDetailView(language: $language)
|
||||
case .audioPlayer:
|
||||
AudioSettingsDetailView(audioPlayer: content.settings.audioPlayer)
|
||||
AudioSettingsDetailView(language: $language, audioPlayer: content.settings.audioPlayer)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#Preview {
|
||||
SettingsContentView(section: .paths)
|
||||
SettingsContentView(
|
||||
language: .constant(.english),
|
||||
section: .constant(.paths))
|
||||
}
|
||||
|
Reference in New Issue
Block a user