Fix preferences post preview background on macOS
This commit is contained in:
parent
c43c951b92
commit
1f9806d02f
|
@ -49,7 +49,7 @@ struct AppearancePrefsView: View {
|
|||
.padding(.top, 8)
|
||||
.padding(.horizontal, UIDevice.current.userInterfaceIdiom == .pad ? 8 : 4)
|
||||
}
|
||||
.listRowBackground(preferences.pureBlackDarkMode ? colorScheme == .dark ? Color.black : Color.white : Color.appBackground)
|
||||
.listRowBackground(mockStatusBackground)
|
||||
|
||||
accountsSection
|
||||
postsSection
|
||||
|
@ -60,6 +60,22 @@ struct AppearancePrefsView: View {
|
|||
.navigationTitle("Appearance")
|
||||
}
|
||||
|
||||
private var mockStatusBackground: Color? {
|
||||
#if targetEnvironment(macCatalyst)
|
||||
nil
|
||||
#else
|
||||
if ProcessInfo.processInfo.isiOSAppOnMac {
|
||||
nil
|
||||
} else if !preferences.pureBlackDarkMode {
|
||||
.appBackground
|
||||
} else if colorScheme == .dark {
|
||||
.black
|
||||
} else {
|
||||
.white
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
private var themeSection: some View {
|
||||
Section {
|
||||
#if !os(visionOS)
|
||||
|
|
Loading…
Reference in New Issue