Skip to content

Commit

Permalink
fix: Set max height for attachments
Browse files Browse the repository at this point in the history
  • Loading branch information
Zomatree committed Jul 21, 2024
1 parent b7143fa commit ee54e62
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Revolt/Components/MessageRenderer/MessageAttachment.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,12 @@ struct MessageAttachment: View {
case .image(_):
LazyImage(source: .file(attachment), clipTo: RoundedRectangle(cornerRadius: 5))
.aspectRatio(contentMode: .fit)
.frame(maxHeight: 400)

case .video(_):
VideoPlayer(player: AVPlayer(url: URL(string: viewState.formatUrl(with: attachment))!))
.aspectRatio(contentMode: .fit)
.frame(maxHeight: 400)

case .file(_), .text(_), .audio(_):
HStack(alignment: .center) {
Expand Down

0 comments on commit ee54e62

Please sign in to comment.