style: DMs only take up 80% of screen width

DMs now take up only 80% of the available screen width so it looks much
more like iMessages.

Closes: #286
Changelog-Changed: Make DMs only take up 80% of screen width
This commit is contained in:
Jonathan Milligan
2023-01-07 19:42:19 -06:00
committed by William Casarin
parent dccaf35410
commit c9463804a8

View File

@@ -18,7 +18,7 @@ struct DMView: View {
var body: some View { var body: some View {
HStack { HStack {
if is_ours { if is_ours {
Spacer() Spacer(minLength: UIScreen.main.bounds.width * 0.2)
} }
let should_show_img = should_show_images(contacts: damus_state.contacts, ev: event, our_pubkey: damus_state.pubkey) let should_show_img = should_show_images(contacts: damus_state.contacts, ev: event, our_pubkey: damus_state.pubkey)
@@ -29,6 +29,9 @@ struct DMView: View {
.background(is_ours ? Color.accentColor : Color.secondary.opacity(0.15)) .background(is_ours ? Color.accentColor : Color.secondary.opacity(0.15))
.cornerRadius(8.0) .cornerRadius(8.0)
.tint(is_ours ? Color.white : Color.accentColor) .tint(is_ours ? Color.white : Color.accentColor)
if !is_ours {
Spacer(minLength: UIScreen.main.bounds.width * 0.2)
}
} }
} }
} }