소스 검색

add explaining comments

cyberta 4 년 전
부모
커밋
8d3caf5c5d
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      deltachat-ios/Chat/Views/Cells/ImageTextCell.swift

+ 2 - 0
deltachat-ios/Chat/Views/Cells/ImageTextCell.swift

@@ -139,8 +139,10 @@ class ImageTextCell: BaseMessageCell {
                                                                                          multiplier: width/height)
             } else {
                 if width == minImageWidth {
+                    // very small width images should be forced to not be scaled down further
                     self.imageWidthConstraint = self.contentImageView.widthAnchor.constraint(equalToConstant: width)
                 } else {
+                    // large width images might scale down until the max allowed text width
                     self.imageWidthConstraint = self.contentImageView.widthAnchor.constraint(lessThanOrEqualToConstant: width)
                 }
                 self.imageHeightConstraint = self.contentImageView.heightAnchor.constraint(