diff --git a/yobble/Views/Chat/PrivateChatView.swift b/yobble/Views/Chat/PrivateChatView.swift index c31e5cb..fe784b1 100644 --- a/yobble/Views/Chat/PrivateChatView.swift +++ b/yobble/Views/Chat/PrivateChatView.swift @@ -22,6 +22,7 @@ struct PrivateChatView: View { @State private var legacyComposerHeight: CGFloat = 40 @State private var isProfilePresented: Bool = false @FocusState private var isComposerFocused: Bool + @EnvironmentObject private var themeManager: ThemeManager @EnvironmentObject private var messageCenter: IncomingMessageCenter @Environment(\.dismiss) private var dismiss @@ -647,7 +648,7 @@ struct PrivateChatView: View { .padding(.horizontal, 6) .padding(.top, 10) .padding(.bottom, 8) - .background(.ultraThinMaterial) + .modifier(ComposerBackgroundModifier(theme: themeManager.theme)) } private func scrollToBottomButton(proxy: ScrollViewProxy) -> some View { @@ -1021,6 +1022,22 @@ private var headerPlaceholderAvatar: some View { } +private struct ComposerBackgroundModifier: ViewModifier { + let theme: Theme + + @ViewBuilder + func body(content: Content) -> some View { + if theme == .oledDark { + content.background(.ultraThinMaterial) +// content.background(Color.black) +// content.background(Color(white: 0.15)) + } else { + content.background(.ultraThinMaterial) + } + } +} + + /// Helper model that stores a message alongside horn/leg flags for grouping sequences. private struct DecoratedMessage: Identifiable { let message: MessageItem