Fix message forwarding issues.

This commit is contained in:
Matthew Chen 2021-08-24 15:00:22 -03:00
parent 617a8b3acd
commit 492cd68a75
4 changed files with 10 additions and 3 deletions

View File

@ -457,7 +457,7 @@ public class CVComponentMessage: CVComponentBase, CVRootComponent {
//
// This bakes in the assumption that the group sender avatar will
// be bottom-aligned with the bottom of the message bubble.
let bottomMidY = bodyTextFrame.midY.average(outerContentFrame.maxY)
let bottomMidY = bodyTextFrame.minY.average(outerContentFrame.maxY)
let bottomY = bottomMidY - size.height * 0.5
bottomSelectionView.frame = CGRect(origin: CGPoint(x: 0, y: bottomY), size: size)
}

View File

@ -186,7 +186,7 @@ public class LongTextViewController: OWSViewController {
// Only forward text.
let selectionType: CVSelectionType = (itemViewModel.componentState.hasPrimaryAndSecondaryContentForSelection
? .secondaryContent
: .primaryContent)
: .allContent)
let selectionItem = CVSelectionItem(interactionId: itemViewModel.interaction.uniqueId,
interactionType: itemViewModel.interaction.interactionType,
isForwardable: true,

View File

@ -322,6 +322,10 @@ open class ConversationPickerViewController: OWSTableViewController2 {
private func updateTableContents() {
AssertIsOnMainThread()
self.defaultSeparatorInsetLeading = (OWSTableViewController2.cellHInnerMargin +
CGFloat(ContactCellView.avatarDiameterPoints) +
ContactCellView.avatarTextHSpacing)
let conversationCollection = self.conversationCollection
let contents = OWSTableContents()

View File

@ -111,8 +111,11 @@ public class ContactCellView: ManualStackView {
private var content: ConversationContent? { configuration?.content }
@objc
public static var avatarDiameterPoints: UInt { AvatarBuilder.smallAvatarSizePoints }
// TODO: Update localUserDisplayMode.
private let avatarView = ConversationAvatarView(diameterPoints: AvatarBuilder.smallAvatarSizePoints,
private let avatarView = ConversationAvatarView(diameterPoints: ContactCellView.avatarDiameterPoints,
localUserDisplayMode: .asUser)
@objc