Improve the UX around post translation (#933)
This commit is contained in:
parent
b8f1304c56
commit
44f366083c
|
@ -483,9 +483,14 @@ extension StatusTableViewCellDelegate where Self: DataSourceProvider & AuthConte
|
|||
return
|
||||
}
|
||||
|
||||
if let cell = cell as? StatusTableViewCell {
|
||||
if case .translateStatus = action {
|
||||
DispatchQueue.main.async {
|
||||
cell.statusView.viewModel.isCurrentlyTranslating = true
|
||||
if let cell = cell as? StatusTableViewCell {
|
||||
cell.statusView.viewModel.isCurrentlyTranslating = true
|
||||
} else if let cell = cell as? StatusThreadRootTableViewCell {
|
||||
cell.statusView.viewModel.isCurrentlyTranslating = true
|
||||
}
|
||||
cell.invalidateIntrinsicContentSize()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -463,12 +463,14 @@ extension StatusView.Style {
|
|||
|
||||
// status content
|
||||
statusView.contentContainer.addArrangedSubview(statusView.contentMetaText.textView)
|
||||
statusView.contentContainer.addArrangedSubview(statusView.statusCardControl)
|
||||
|
||||
// translated info
|
||||
statusView.containerStackView.addArrangedSubview(statusView.isTranslatingLoadingView)
|
||||
statusView.containerStackView.addArrangedSubview(statusView.translatedInfoView)
|
||||
|
||||
// link preview card
|
||||
statusView.contentContainer.addArrangedSubview(statusView.statusCardControl)
|
||||
|
||||
statusView.spoilerOverlayView.translatesAutoresizingMaskIntoConstraints = false
|
||||
statusView.containerStackView.addSubview(statusView.spoilerOverlayView)
|
||||
statusView.contentContainer.pinTo(to: statusView.spoilerOverlayView)
|
||||
|
|
Loading…
Reference in New Issue