Browse Source

left align full message button

cyberta 4 years ago
parent
commit
a9c1530090

+ 2 - 2
deltachat-ios/Chat/Views/Cells/BaseMessageCell.swift

@@ -132,7 +132,7 @@ public class BaseMessageCell: UITableViewCell {
         button.setTitleColor(.systemBlue, for: .normal)
         button.setTitleColor(.gray, for: .highlighted)
         button.titleLabel?.lineBreakMode = .byWordWrapping
-        button.titleLabel?.textAlignment = .center
+        button.titleLabel?.textAlignment = .left
         button.addTarget(self, action: #selector(onFullMessageButtonTapped), for: .touchUpInside)
         button.titleLabel?.font = UIFont.preferredFont(for: .body, weight: .regular)
         button.titleLabel?.adjustsFontForContentSizeCategory = true
@@ -196,7 +196,7 @@ public class BaseMessageCell: UITableViewCell {
             messageBackgroundContainer.constraintAlignTopTo(contentView, paddingTop: 3),
             messageBackgroundContainer.constraintAlignBottomTo(contentView, paddingBottom: 3),
             fullMessageButton.constraintAlignLeadingTo(messageBackgroundContainer, paddingLeading: 12),
-            fullMessageButton.constraintAlignTrailingTo(messageBackgroundContainer, paddingTrailing: 12),
+            fullMessageButton.constraintAlignTrailingMaxTo(messageBackgroundContainer, paddingTrailing: 12),
             bottomLabel.constraintAlignLeadingMaxTo(messageBackgroundContainer, paddingLeading: 8),
             bottomLabel.constraintAlignTrailingTo(messageBackgroundContainer, paddingTrailing: 8),
             bottomLabel.constraintToBottomOf(fullMessageButton, priority: .defaultHigh),

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

@@ -33,7 +33,7 @@ public class QuotePreview: DraftPreview {
             compactView = draft.attachment != nil
             calculateQuoteHeight(compactView: compactView)
             if let quoteMessage = draft.quoteMessage {
-                quoteView.imagePreview.image = quoteMessage.image
+                quoteView.setImagePreview(quoteMessage.image)
                 if quoteMessage.isForwarded {
                     quoteView.senderTitle.text = String.localized("forwarded_message")
                     quoteView.senderTitle.textColor = DcColors.grayDateColor