diff --git a/Mastodon/Scene/Compose/ComposeViewModel+Diffable.swift b/Mastodon/Scene/Compose/ComposeViewModel+Diffable.swift index a7b3ee028..0d00fe239 100644 --- a/Mastodon/Scene/Compose/ComposeViewModel+Diffable.swift +++ b/Mastodon/Scene/Compose/ComposeViewModel+Diffable.swift @@ -180,6 +180,10 @@ extension ComposeViewModel: UITableViewDataSource { case .repliedTo: let cell = tableView.dequeueReusableCell(withIdentifier: String(describing: ComposeRepliedToStatusContentTableViewCell.self), for: indexPath) as! ComposeRepliedToStatusContentTableViewCell guard case let .reply(statusObjectID) = composeKind else { return cell } + cell.framePublisher + .receive(on: DispatchQueue.main) + .assign(to: \.value, on: self.repliedToCellFrame) + .store(in: &cell.disposeBag) let managedObjectContext = context.managedObjectContext managedObjectContext.performAndWait { guard let replyTo = managedObjectContext.object(with: statusObjectID) as? Status else { @@ -203,10 +207,6 @@ extension ComposeViewModel: UITableViewDataSource { } // set date cell.statusView.dateLabel.text = status.createdAt.slowedTimeAgoSinceNow - - cell.framePublisher - .assign(to: \.value, on: self.repliedToCellFrame) - .store(in: &cell.disposeBag) } return cell case .status: diff --git a/Mastodon/Scene/Compose/View/ReplicaStatusView.swift b/Mastodon/Scene/Compose/View/ReplicaStatusView.swift index 7b1378625..0f53b113a 100644 --- a/Mastodon/Scene/Compose/View/ReplicaStatusView.swift +++ b/Mastodon/Scene/Compose/View/ReplicaStatusView.swift @@ -213,12 +213,15 @@ extension ReplicaStatusView { titleContainerStackView.alignment = .firstBaseline titleContainerStackView.addArrangedSubview(nameTrialingDotLabel) titleContainerStackView.addArrangedSubview(dateLabel) - titleContainerStackView.addArrangedSubview(UIView()) // padding + let padding = UIView() + titleContainerStackView.addArrangedSubview(padding) // padding nameLabel.setContentHuggingPriority(.defaultHigh + 1, for: .horizontal) nameTrialingDotLabel.setContentHuggingPriority(.defaultHigh + 2, for: .horizontal) nameTrialingDotLabel.setContentCompressionResistancePriority(.required - 2, for: .horizontal) dateLabel.setContentHuggingPriority(.defaultHigh, for: .horizontal) dateLabel.setContentCompressionResistancePriority(.required - 1, for: .horizontal) + padding.setContentHuggingPriority(.defaultLow - 1, for: .horizontal) + padding.setContentCompressionResistancePriority(.defaultLow - 1, for: .horizontal) // subtitle container: [username] let subtitleContainerStackView = UIStackView()