Work around the hang due to infinite layout shifts
This commit is contained in:
parent
065906c3d1
commit
f39812c80d
|
@ -37,6 +37,7 @@ extension ComposeContentViewModel {
|
|||
$contentCellFrame
|
||||
.map { $0.height }
|
||||
.removeDuplicates()
|
||||
.throttle(for: 0.5, scheduler: RunLoop.main, latest: true)
|
||||
.sink { [weak self] height in
|
||||
guard let self = self else { return }
|
||||
guard !tableView.visibleCells.isEmpty else { return }
|
||||
|
|
|
@ -83,6 +83,7 @@ public struct ComposeContentView: View {
|
|||
authorView
|
||||
.padding(.top, 14)
|
||||
.padding(.horizontal, ComposeContentView.margin)
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
// content editor
|
||||
MetaTextViewRepresentable(
|
||||
string: $viewModel.content,
|
||||
|
|
Loading…
Reference in New Issue