Pārlūkot izejas kodu

add explaining comments

cyberta 4 gadi atpakaļ
vecāks
revīzija
8d3caf5c5d
1 mainītis faili ar 2 papildinājumiem un 0 dzēšanām
  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(