소스 검색

restrict file title to 2 lines in document preview

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

+ 1 - 0
deltachat-ios/Chat/Views/DocumentPreview.swift

@@ -9,6 +9,7 @@ public class DocumentPreview: DraftPreview {
         let view = FileView()
         view.translatesAutoresizingMaskIntoConstraints = false
         view.allowLayoutChange = false
+        view.fileTitle.numberOfLines = 2
         return view
     }()
 

+ 1 - 1
deltachat-ios/Chat/Views/FileView.swift

@@ -55,7 +55,7 @@ public class FileView: UIView {
         return stackView
     }()
 
-    private lazy var fileTitle: UILabel = {
+    lazy var fileTitle: UILabel = {
         let title = UILabel()
         title.font = UIFont.preferredItalicFont(for: .body)
         title.translatesAutoresizingMaskIntoConstraints = false