dms: make chat area more obvious
This was an ios16 bug Changelog-Fixed: Make dm chat area visible again
This commit is contained in:
@@ -12,6 +12,12 @@ struct DMChatView: View {
|
||||
let pubkey: String
|
||||
@EnvironmentObject var dms: DirectMessageModel
|
||||
@State var message: String = ""
|
||||
|
||||
init(damus_state: DamusState, pubkey: String) {
|
||||
self.damus_state = damus_state
|
||||
self.pubkey = pubkey
|
||||
UITextView.appearance().backgroundColor = .clear
|
||||
}
|
||||
|
||||
var Messages: some View {
|
||||
ScrollViewReader { scroller in
|
||||
@@ -47,11 +53,9 @@ struct DMChatView: View {
|
||||
|
||||
var InputField: some View {
|
||||
TextEditor(text: $message)
|
||||
.textEditorBackground {
|
||||
InputBackground()
|
||||
}
|
||||
.cornerRadius(20)
|
||||
.padding(16)
|
||||
.padding(8)
|
||||
.background(InputBackground().cornerRadius(20))
|
||||
.foregroundColor(Color.primary)
|
||||
}
|
||||
|
||||
@@ -59,9 +63,9 @@ struct DMChatView: View {
|
||||
|
||||
func InputBackground() -> Color {
|
||||
if colorScheme == .light {
|
||||
return Color.init(.sRGB, red: 0.9, green: 0.9, blue: 0.9, opacity: 1.0)
|
||||
return Color.init(.sRGB, red: 0.8, green: 0.8, blue: 0.8, opacity: 1.0)
|
||||
} else {
|
||||
return Color.init(.sRGB, red: 0.1, green: 0.1, blue: 0.1, opacity: 1.0)
|
||||
return Color.init(.sRGB, red: 0.2, green: 0.2, blue: 0.2, opacity: 1.0)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -74,21 +78,21 @@ struct DMChatView: View {
|
||||
}
|
||||
|
||||
var Footer: some View {
|
||||
ZStack {
|
||||
BackgroundColor()
|
||||
//ZStack {
|
||||
//BackgroundColor()
|
||||
|
||||
HStack(spacing: 0) {
|
||||
InputField
|
||||
HStack(spacing: 0) {
|
||||
InputField
|
||||
|
||||
if !message.isEmpty {
|
||||
Button(role: .none, action: send_message) {
|
||||
Label("", systemImage: "arrow.right.circle")
|
||||
.font(.title)
|
||||
}
|
||||
if !message.isEmpty {
|
||||
Button(role: .none, action: send_message) {
|
||||
Label("", systemImage: "arrow.right.circle")
|
||||
.font(.title)
|
||||
}
|
||||
}
|
||||
}
|
||||
.frame(height: 50 + 20 * CGFloat(text_lines))
|
||||
//}
|
||||
}
|
||||
|
||||
var text_lines: Int {
|
||||
|
||||
Reference in New Issue
Block a user